summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-02-05 16:31:27 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-02-05 16:31:28 -0800
commit2d436678a70c118bc2683b8d81131459e602a1d7 (patch)
tree552fe457ec2d800874d4a1a09d50f2f53be492db /t
parentMerge branch 'jk/forbid-lf-in-git-url' into maint (diff)
parentpatch-ids: handle duplicate hashmap entries (diff)
downloadtgif-2d436678a70c118bc2683b8d81131459e602a1d7.tar.xz
Merge branch 'jk/log-cherry-pick-duplicate-patches' into maint
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')
-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 f0268372d2..8bf5ae23c2 100755
--- a/t/t6007-rev-list-cherry-pick-file.sh
+++ b/t/t6007-rev-list-cherry-pick-file.sh
@@ -245,6 +245,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 () {