diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-14 21:24:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-14 21:24:18 -0700 |
commit | 78ed88d80a8cc9e2388ebe7631d71253e1d55aab (patch) | |
tree | 060b4e8f75accc932befb149c66bc8e4fa0bd6e5 /t | |
parent | c336bc104c47cc9c2f7caf6bce468fe00a8f6850 (diff) | |
parent | a73e22e96350c9bcb5c0e31e0298ce67bec0a527 (diff) | |
download | git-78ed88d80a8cc9e2388ebe7631d71253e1d55aab.tar.gz |
Merge branch 'mz/cherry-pick-cmdline-order' into maint
* mz/cherry-pick-cmdline-order:
cherry-pick/revert: respect order of revisions to pick
demonstrate broken 'git cherry-pick three one two'
teach log --no-walk=unsorted, which avoids sorting
Diffstat (limited to 't')
-rwxr-xr-x | t/t3508-cherry-pick-many-commits.sh | 15 | ||||
-rwxr-xr-x | t/t4202-log.sh | 10 |
2 files changed, 25 insertions, 0 deletions
diff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh index 75f7ff4f2f..340afc760d 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_success '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 diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 45058cc8cb..b3ac6be3b0 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh @@ -178,11 +178,21 @@ test_expect_success 'git log --no-walk <commits> sorts by commit time' ' test_cmp expect actual ' +test_expect_success 'git log --no-walk=sorted <commits> sorts by commit time' ' + git log --no-walk=sorted --oneline 5d31159 804a787 394ef78 > actual && + test_cmp expect actual +' + cat > expect << EOF 5d31159 fourth 804a787 sixth 394ef78 fifth EOF +test_expect_success 'git log --no-walk=unsorted <commits> leaves list of commits as given' ' + git log --no-walk=unsorted --oneline 5d31159 804a787 394ef78 > actual && + test_cmp expect actual +' + test_expect_success 'git show <commits> leaves list of commits as given' ' git show --oneline -s 5d31159 804a787 394ef78 > actual && test_cmp expect actual |