Re: [PATCH v2 05/10] ref-filter: adopt get_head_description() from branch.c
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Oct 10, 2015, 18:17 UTC
- Message-ID
- <CAOLa=ZQ2vqBiYssW-95ojy7UeKUrzzpP9PpJy9MTEtRL2wovsA@mail.gmail.com>
- In-Reply-To
- <vpq8u7dmbgw.fsf@grenoble-inp.fr>
On Fri, Oct 9, 2015 at 12:31 AM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 17 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes: > >> Copy the implementation of get_head_description() from branch.c. This >> gives a description of the HEAD ref if called. This is used as the >> refname for the HEAD ref whenever the FILTER_REFS_DETACHED_HEAD option >> is used. Make it public because we need it to calculate the length of >> the HEAD refs description in branch.c:calc_maxwidth() when we port >> branch.c to use ref-filter APIs. > > If it's made public, then it could be simpler to just _move_ the > function instead of copying it. You'd need to add a #include > <ref-filter.c> to branch.c, but you're going to add one anyway. > > Code movement is more "git blame" friendly than code copy, and as a > reviewer I'd rather see the code movement here and not hear about it > later in the series. >
Also this needs to be done, cause now compiling branch.c would give a multiple declaration error. Will do as you suggested. Thanks
-- Regards, Karthik Nayak