From: Matthieu Moy Date: Thu, 08 Oct 2015 19:01:03 GMT Subject: Re: [PATCH v2 05/10] ref-filter: adopt get_head_description() from branch.c Message-ID: In-Reply-To: <1444295885-1657-6-git-send-email-Karthik.188@gmail.com> Karthik Nayak 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 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/