Subject: Re: [RFC/PATCH 1/4] show: obey --textconv for blobs

From: Michael J Gruber <[email-masked]>
Date: Thu, 07 Feb 2013 10:34:26 +0100

Jeff King venit, vidit, dixit 07.02.2013 10:11:
> On Thu, Feb 07, 2013 at 10:05:26AM +0100, Michael J Gruber wrote:
> 
>>> Would it be better if object_array_entry replaced its "mode" member with
>>> an object_context?
>>
>> Do all callers/users want to deal with object_context?
> 
> Wouldn't it just mean replacing "entry->mode" with "entry->oc.mode" at
> each user?

Yes, I meant at the time of creation, i.e. when someone has to create
and pass an o_a_e and maybe only knows a mode, and thus would have to
set the path to NULL or "".

>> I'm wondering why o_c has a mode at all, since it is mostly used in
>> conjunction with an object, isn't it?
> 
> Just as we record the path from the surrounding tree, we record the
> mode. It's that mode which gets put into the pending object list by the
> revision parser (see the very end of handle_revision_arg). Storing an
> object_context instead of the mode would be a strict superset of what we
> store now (right now we just throw the rest away).

Sure. But why does object_context have a mode member at all? Maybe it is
not alway used together with another struct which has the mode already,
then that's a reason.

Michael