Re: [[PATCH v2] 2/4] patch-ids: replace the seen indicator with a commit pointer
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 29, 2016, 21:03 UTC
- Message-ID
- <xmqqk2g4ma1o.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20160729161920.3792-3-kcwillford@gmail.com>
Kevin Willford <kcwillford@gmail.com> writes:
Show 13 quoted lines
> From: Kevin Willford <kewillf@microsoft.com> > > The cherry_pick_list was looping through the original side checking the > seen indicator and setting the cherry_flag on the commit. If we save > off the commit in the patch_id we can set the cherry_flag on the correct > commit when running through the other side when a patch_id match is found. > > Signed-off-by: Kevin Willford <kcwillford@gmail.com> > --- > patch-ids.c | 1 + > patch-ids.h | 2 +- > revision.c | 18 +++--------------- > 3 files changed, 5 insertions(+), 16 deletions(-)
We lose the final loop to fix up the shorter side, because the second loop now marks both sides.
And as a side effect, we do not use commit->util which is a scarce shared resource (aka historical API wart).
Makes sense. Thanks.