diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-07-13 14:00:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-07-13 14:00:25 -0700 |
commit | e01787f1a1de589b7adc6f6946b53996a5e74c34 (patch) | |
tree | 470370b475717ef3a0fc878e67d399a1b5d2525f /t/t3404-rebase-interactive.sh | |
parent | 0e521a41b526f6dbde76030ca7e7c1107115c120 (diff) | |
parent | 0e0aff4b4ca93053a83578cb040475c6e3185f2d (diff) | |
download | git-e01787f1a1de589b7adc6f6946b53996a5e74c34.tar.gz |
Merge branch 'js/rebase-i-clean-up-upon-continue-to-skip'
Abandoning an already applied change in "git rebase -i" with
"--continue" left CHERRY_PICK_HEAD and confused later steps.
* js/rebase-i-clean-up-upon-continue-to-skip:
rebase -i: do not leave a CHERRY_PICK_HEAD file behind
t3404: demonstrate CHERRY_PICK_HEAD bug
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index ac429a0bbb..467e6c1ed5 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -1102,4 +1102,25 @@ test_expect_success 'rebase -i commits that overwrite untracked files (no ff)' ' test $(git cat-file commit HEAD | sed -ne \$p) = I ' +test_expect_success 'rebase --continue removes CHERRY_PICK_HEAD' ' + git checkout -b commit-to-skip && + for double in X 3 1 + do + test_seq 5 | sed "s/$double/&&/" >seq && + git add seq && + test_tick && + git commit -m seq-$double + done && + git tag seq-onto && + git reset --hard HEAD~2 && + git cherry-pick seq-onto && + set_fake_editor && + test_must_fail env FAKE_LINES= git rebase -i seq-onto && + test -d .git/rebase-merge && + git rebase --continue && + git diff --exit-code seq-onto && + test ! -d .git/rebase-merge && + test ! -f .git/CHERRY_PICK_HEAD +' + test_done |