aboutsummaryrefslogtreecommitdiffstats
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-01-25 14:19:19 -0800
committerJunio C Hamano <gitster@pobox.com>2021-01-25 14:19:19 -0800
commitb69bed22c59fa08848bd7ffa5fbfacc0b62fcd48 (patch)
tree047ebb72feb3534f7929ae8a52cb9e43a0f23d81 /revision.c
parent27d7c8599b159862762e2bd121c22d516fb04e90 (diff)
parentc9e3a4e76d57b03170118aa67054af0b81e7f507 (diff)
downloadgit-b69bed22c59fa08848bd7ffa5fbfacc0b62fcd48.tar.gz
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 'revision.c')
-rw-r--r--revision.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/revision.c b/revision.c
index 1bb590ece7..0b5c723140 100644
--- a/revision.c
+++ b/revision.c
@@ -1241,12 +1241,14 @@ static void cherry_pick_list(struct commit_list *list, struct rev_info *revs)
/*
* Have we seen the same patch id?
*/
- id = has_commit_patch_id(commit, &ids);
+ id = patch_id_iter_first(commit, &ids);
if (!id)
continue;
commit->object.flags |= cherry_flag;
- id->commit->object.flags |= cherry_flag;
+ do {
+ id->commit->object.flags |= cherry_flag;
+ } while ((id = patch_id_iter_next(id, &ids)));
}
free_patch_ids(&ids);