Re: [RFC/PATCH 2/4] cat-file: do not die on --textconv without textconv filters
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 6, 2013, 22:23 UTC
- Message-ID
- <7vvca59j4n.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130206221912.GD27507@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> Which made me wonder: what happens with: > > git cat-file --textconv HEAD > > It looks like we die just before textconv-ing, because we have no > obj_context.path. But that is also unlike all of the other --textconv > switches, which mean "turn on textconv if you are showing a blob that > supports it" and not "the specific operation is --textconv, apply it to > this blob". I don't know if that is worth changing or not.
OK, so in that sense, "cat-file --textconv HEAD" (or HEAD:) should die with "Hey, that is not a blob", in other words, Michael's patch does what we want without further tweaks, right?
By the way are we sure textconv_object() barfs and dies if fed a non blob? Otherwise the above does not hold, and the semantics become "turn on textconv if the object you are showing supports it, otherwise it has to be a blob.", I think.