diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-08-26 22:55:10 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-26 22:55:10 -0700 |
commit | 6e6ba65a7c8f8f9556ec42678f661794d47f7f98 (patch) | |
tree | 3a9714f9a2794a1511d974b79d20e124f2ef6a7d /t | |
parent | Merge branch 'jt/packmigrate' (diff) | |
parent | merge: save merge state earlier (diff) | |
download | tgif-6e6ba65a7c8f8f9556ec42678f661794d47f7f98.tar.xz |
Merge branch 'mg/killed-merge'
Killing "git merge --edit" before the editor returns control left
the repository in a state with MERGE_MSG but without MERGE_HEAD,
which incorrectly tells the subsequent "git commit" that there was
a squash merge in progress. This has been fixed.
* mg/killed-merge:
merge: save merge state earlier
merge: split write_merge_state in two
merge: clarify call chain
Documentation/git-merge: explain --continue
Diffstat (limited to 't')
-rwxr-xr-x | t/t7600-merge.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index 2ebda509ac..80194b79f9 100755 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@ -774,4 +774,19 @@ test_expect_success 'merge can be completed with --continue' ' verify_parents $c0 $c1 ' +write_script .git/FAKE_EDITOR <<EOF +# kill -TERM command added below. +EOF + +test_expect_success EXECKEEPSPID 'killed merge can be completed with --continue' ' + git reset --hard c0 && + ! "$SHELL_PATH" -c '\'' + echo kill -TERM $$ >> .git/FAKE_EDITOR + GIT_EDITOR=.git/FAKE_EDITOR + export GIT_EDITOR + exec git merge --no-ff --edit c1'\'' && + git merge --continue && + verify_parents $c0 $c1 +' + test_done |