[PATCH 0/3] name_decoration cleanups
- From
Jeff King <peff@peff.net>
- Date
- Aug 26, 2014, 10:20 UTC
- Message-ID
- <20140826102051.GA4885@peff.net>
- In-Reply-To
- <xmqqha10l1g2.fsf@gitster.dls.corp.google.com>
On Mon, Aug 25, 2014 at 02:11:09PM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> Jeff King <peff@peff.net> writes: > > > On Mon, Aug 25, 2014 at 11:26:39AM -0700, Junio C Hamano wrote: > > > >> Good digging, and I agree that it should use the FLEX_ARRAY for > >> consistency. > > > > I can produce a patch, but I did not want to steal Arjun's thunder. > > Hmph, would it have to overlap? I think we can queue Arjun's patch > with +1 fix and FLEX_ARRAY thing separately, and they can go in in > any order, no?
I more meant my suggestion to use add_name_decoration consistently. That fixes the r->type thing _and_ replaces Arjun's patch. Fixing FLEX_ARRAY on top is just gravy. :)
Here's the patch series I was thinking of:
[1/3]: log-tree: make add_name_decoration a public function [2/3]: log-tree: make name_decoration hash static [3/3]: log-tree: use FLEX_ARRAY in name_decoration
I almost added a 4/3 to convert "name_decoration" to "commit_decoration", since that is how it is used (and name_decoration is somewhat vague). But we actually do annotate other non-commit objects that refs point to, as well. I'm not sure there is a way to _show_ them currently, but I'd just as soon leave it as-is.
-Peff