summaryrefslogtreecommitdiff
path: root/t/t3508-cherry-pick-many-commits.sh
diff options
context:
space:
mode:
authorMartin von Zweigbergk <martinvonz@gmail.com>2012-08-29 06:15:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-08-30 21:00:18 (GMT)
commitd023c248a39a7ac3ee226e34eadcee6913913f2f (patch)
tree979c4f9913fece4cf6fb1ad7be2dad7d57a0e59a /t/t3508-cherry-pick-many-commits.sh
parentca92e59e30b503ff8861b6cd4d431d38738a7ee8 (diff)
downloadgit-d023c248a39a7ac3ee226e34eadcee6913913f2f.zip
git-d023c248a39a7ac3ee226e34eadcee6913913f2f.tar.gz
git-d023c248a39a7ac3ee226e34eadcee6913913f2f.tar.bz2
demonstrate broken 'git cherry-pick three one two'
Cherry-picking commits out of order (w.r.t. commit time stamp) doesn't currently work. Add a test case to demonstrate it. Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3508-cherry-pick-many-commits.sh')
-rwxr-xr-xt/t3508-cherry-pick-many-commits.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh
index 75f7ff4..afda2d5 100755
--- a/t/t3508-cherry-pick-many-commits.sh
+++ b/t/t3508-cherry-pick-many-commits.sh
@@ -44,6 +44,21 @@ test_expect_success 'cherry-pick first..fourth works' '
check_head_differs_from fourth
'
+test_expect_failure 'cherry-pick three one two works' '
+ git checkout -f first &&
+ test_commit one &&
+ test_commit two &&
+ test_commit three &&
+ git checkout -f master &&
+ git reset --hard first &&
+ git cherry-pick three one two &&
+ git diff --quiet three &&
+ git diff --quiet HEAD three &&
+ test "$(git log --reverse --format=%s first..)" = "three
+one
+two"
+'
+
test_expect_success 'output to keep user entertained during multi-pick' '
cat <<-\EOF >expected &&
[master OBJID] second