Re: [PATCH v2 05/10] ref-filter: adopt get_head_description() from branch.c
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Oct 8, 2015, 19:01 UTC
- Message-ID
- <vpq8u7dmbgw.fsf@grenoble-inp.fr>
- In-Reply-To
- <1444295885-1657-6-git-send-email-Karthik.188@gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 6 quoted lines
> 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.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/