summaryrefslogtreecommitdiff
path: root/t/t5520-pull.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-01-13 13:17:15 +0100
committerJunio C Hamano <gitster@pobox.com>2016-01-13 12:59:15 -0800
commitf5eb87b98dd6aa587683057b9f5bd063e682e145 (patch)
tree6a8efdcf373a731fa660412f0669b5fab564037a /t/t5520-pull.sh
parent754884255bb580df159e58defa81cdd30b5c430c (diff)
downloadgit-f5eb87b98dd6aa587683057b9f5bd063e682e145.tar.gz
pull: allow interactive rebase with --rebase=interactive
A couple of years ago, I found the need to collaborate on topic branches that were rebased all the time, and I really needed to see what I was rebasing when pulling, so I introduced an interactively-rebasing pull. The way builtin pull works, this change also supports the value 'interactive' for the 'branch.<name>.rebase' config variable, which is a neat thing because users can now configure given branches for interactively-rebasing pulls without having to type out the complete `--rebase=interactive` option every time they pull. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5520-pull.sh')
-rwxr-xr-xt/t5520-pull.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index a0013ee32f..c952d5ef5c 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -326,6 +326,16 @@ test_expect_success 'pull.rebase=preserve rebases and merges keep-merge' '
test "$(git rev-parse HEAD^2)" = "$(git rev-parse keep-merge)"
'
+test_expect_success 'pull.rebase=interactive' '
+ write_script "$TRASH_DIRECTORY/fake-editor" <<-\EOF &&
+ echo I was here >fake.out &&
+ false
+ EOF
+ test_set_editor "$TRASH_DIRECTORY/fake-editor" &&
+ test_must_fail git pull --rebase=interactive . copy &&
+ test "I was here" = "$(cat fake.out)"
+'
+
test_expect_success 'pull.rebase=invalid fails' '
git reset --hard before-preserve-rebase &&
test_config pull.rebase invalid &&