diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-01-25 14:19:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-25 14:19:19 -0800 |
commit | b69bed22c59fa08848bd7ffa5fbfacc0b62fcd48 (patch) | |
tree | 047ebb72feb3534f7929ae8a52cb9e43a0f23d81 /t | |
parent | Merge branch 'js/default-branch-name-tests-final-stretch' (diff) | |
parent | patch-ids: handle duplicate hashmap entries (diff) | |
download | tgif-b69bed22c59fa08848bd7ffa5fbfacc0b62fcd48.tar.xz |
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')
-rwxr-xr-x | t/t6007-rev-list-cherry-pick-file.sh | 12 |
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 b22bf00598..aebe4b69e1 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 () { |