Re: [PATCH 2/6] show: obey --textconv for blobs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 22, 2013, 15:25 UTC
- Message-ID
- <7vwqrupoy2.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130421033710.GA18890@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> Just my two cents as a reviewer. > >> My reasoning is twofold: >> >> - consistency between "git show commit" and "git show blob" > > I'm not sure I agree with this line of reasoning. "git show commit" is > showing a diff, not the file contents; textconv has always been about > munging the contents to produce a textual diff. It may be reasonable to > extend its definition to "this is the preferred human view of this > content, and that happens to be what you would want to produce a diff". > But I do not think it is necessarily inconsistent not to apply it for > the blob case.
True. Applying textconv to otherwise unreadable blobs is often useful, but I agree that it is unexpected if it is done by default, especially given that many people have learned to do:
git show HEAD~4:binary-gob >old-binary-gob
to recover old version of binary contents to a temporary file when checking the sanity of or restoring the breakage in the new one.
It of course does _not_ forbid
git show --textconv HEAD~4:binary-gob | less
but I doubt it is a good idea to turn it on by default this late in the game.