From: Karthik Nayak Date: Sat, 10 Oct 2015 18:17:14 GMT Subject: Re: [PATCH v2 05/10] ref-filter: adopt get_head_description() from branch.c Message-ID: In-Reply-To: On Fri, Oct 9, 2015 at 12:31 AM, Matthieu Moy wrote: > 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. > 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