diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2016-01-13 13:17:15 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-01-13 12:59:15 -0800 |
commit | f5eb87b98dd6aa587683057b9f5bd063e682e145 (patch) | |
tree | 6a8efdcf373a731fa660412f0669b5fab564037a /t | |
parent | Git 2.7 (diff) | |
download | tgif-f5eb87b98dd6aa587683057b9f5bd063e682e145.tar.xz |
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')
-rwxr-xr-x | t/t5520-pull.sh | 10 |
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 && |