Re: [PATCH] git-cat-file: fix output when format string contains no variables
- From
- Sven Brauch <svenbrauch@googlemail.com>
- Date
- Nov 6, 2013, 19:40 UTC
- Message-ID
- <5085823.Oad8MOHc71@localhost.localdomain>
- In-Reply-To
- <xmqqsiv98l5y.fsf@gitster.dls.corp.google.com>
On Wednesday 06 November 2013 10:00:57 Junio C Hamano wrote:
> Thanks; first some procedural issues:
Thanks, I will take care of the mentioned points for future submissions.
Show 7 quoted lines
> I think the real problem is that sha1_loose_object_info() is called > by sha1_object_info_extended(), when it does not find a cached or a > packed object, and the callee assumes that it is asked to fill in > only the requested pieces of information while the caller does not > even bother to check if such an object actually exists. > > How about doing it like the attached instead?
Yes; this seems more like a proper fix. I would prefer it over my suggestion. It is illogical that sha1_loose_object_info sometimes returns an error if the object does not exist and sometimes not, depending on which properties are requested.
Sven