summaryrefslogtreecommitdiff
path: root/t/t6007-rev-list-cherry-pick-file.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-01-25 22:19:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-01-25 22:19:19 (GMT)
commitb69bed22c59fa08848bd7ffa5fbfacc0b62fcd48 (patch)
tree047ebb72feb3534f7929ae8a52cb9e43a0f23d81 /t/t6007-rev-list-cherry-pick-file.sh
parent27d7c8599b159862762e2bd121c22d516fb04e90 (diff)
parentc9e3a4e76d57b03170118aa67054af0b81e7f507 (diff)
downloadgit-b69bed22c59fa08848bd7ffa5fbfacc0b62fcd48.zip
git-b69bed22c59fa08848bd7ffa5fbfacc0b62fcd48.tar.gz
git-b69bed22c59fa08848bd7ffa5fbfacc0b62fcd48.tar.bz2
Merge branch 'jk/log-cherry-pick-duplicate-patches'
When more than one commit with the same patch ID appears on one side, "git log --cherry-pick A...B" did not exclude them all when a commit with the same patch ID appears on the other side. Now it does. * jk/log-cherry-pick-duplicate-patches: patch-ids: handle duplicate hashmap entries
Diffstat (limited to 't/t6007-rev-list-cherry-pick-file.sh')
-rwxr-xr-xt/t6007-rev-list-cherry-pick-file.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t6007-rev-list-cherry-pick-file.sh b/t/t6007-rev-list-cherry-pick-file.sh
index b22bf00..aebe4b6 100755
--- a/t/t6007-rev-list-cherry-pick-file.sh
+++ b/t/t6007-rev-list-cherry-pick-file.sh
@@ -248,6 +248,18 @@ test_expect_success '--count --left-right' '
test_cmp expect actual
'
+test_expect_success '--cherry-pick with duplicates on each side' '
+ git checkout -b dup-orig &&
+ test_commit dup-base &&
+ git revert dup-base &&
+ git cherry-pick dup-base &&
+ git checkout -b dup-side HEAD~3 &&
+ test_tick &&
+ git cherry-pick -3 dup-orig &&
+ git rev-list --cherry-pick dup-orig...dup-side >actual &&
+ test_must_be_empty actual
+'
+
# Corrupt the object store deliberately to make sure
# the object is not even checked for its existence.
remove_loose_object () {