Re: [PATCH 20/29] blame: rework methods that determine 'final' commit
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 25, 2017, 04:59 UTC
- Message-ID
- <xmqqwp95edlh.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170524051537.29978-21-whydoubt@gmail.com>
Jeff Smith <whydoubt@gmail.com> writes:
Show 8 quoted lines
> Either prepare_initial or prepare_final is used to determine which > commit is marked as 'final'. Call the underlying methods directly to > make this more clear. > > Signed-off-by: Jeff Smith <whydoubt@gmail.com> > --- > builtin/blame.c | 49 +++++++++++++++++++++++-------------------------- > 1 file changed, 23 insertions(+), 26 deletions(-)
I do not necessarily agree with the log message in that this change makes the contrast between prepare_{initial,final} more clear, but I like it nevertheless because it makes the interface into the helpers that prepare "initial" and "final" very similar.
The lifetime rule of final_commit_name used to be that these helpers make a copy to be owned by the caller, and it seems that this change makes all codepaths borrow it from entries in the revs.pending list. I think that conversion is also done correctly in this patch.
So far, nicely done.