summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2011-12-10 12:59:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-12-12 21:32:16 (GMT)
commit7acaaac275a1d338f7b2540779b7ea60f3f0667c (patch)
treed7319ca691bcd52b37d71603988dd1107c2dda4c /t
parent7f13334e074bb053eccd14787e416306bc4b413a (diff)
downloadgit-7acaaac275a1d338f7b2540779b7ea60f3f0667c.zip
git-7acaaac275a1d338f7b2540779b7ea60f3f0667c.tar.gz
git-7acaaac275a1d338f7b2540779b7ea60f3f0667c.tar.bz2
revert: allow single-pick in the middle of cherry-pick sequence
After messing up a difficult conflict resolution in the middle of a cherry-pick sequence, it can be useful to be able to git checkout HEAD . && git cherry-pick that-one-commit to restart the conflict resolution. The current code however errors out saying that another cherry-pick is already in progress. Suggested-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t3510-cherry-pick-sequence.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t3510-cherry-pick-sequence.sh b/t/t3510-cherry-pick-sequence.sh
index 56c95ec..98a27a23 100755
--- a/t/t3510-cherry-pick-sequence.sh
+++ b/t/t3510-cherry-pick-sequence.sh
@@ -50,6 +50,18 @@ test_expect_success 'cherry-pick persists data on failure' '
test_path_is_file .git/sequencer/opts
'
+test_expect_success 'cherry-pick mid-cherry-pick-sequence' '
+ pristine_detach initial &&
+ test_must_fail git cherry-pick base..anotherpick &&
+ test_cmp_rev picked CHERRY_PICK_HEAD &&
+ # "oops, I forgot that these patches rely on the change from base"
+ git checkout HEAD foo &&
+ git cherry-pick base &&
+ git cherry-pick picked &&
+ git cherry-pick --continue &&
+ git diff --exit-code anotherpick
+'
+
test_expect_success 'cherry-pick persists opts correctly' '
pristine_detach initial &&
test_must_fail git cherry-pick -s -m 1 --strategy=recursive -X patience -X ours base..anotherpick &&