Re: [PATCH 2/6] show: obey --textconv for blobs
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Apr 23, 2013, 08:58 UTC
- Message-ID
- <51764D3E.9020403@drmicha.warpmail.net>
- In-Reply-To
- <vpqfvyi7e86.fsf@grenoble-inp.fr>
Matthieu Moy venit, vidit, dixit 22.04.2013 17:54:
Show 15 quoted lines
> Jeremy Rosen <jeremy.rosen@openwide.fr> writes: > >> some features detect if they are piping to a terminal... couldn't we do >> something like that ? > > That's OK for convenience features like colors or so, but that would be > really, really unexpected to have > > $ git show HEAD:file > foo > $ git show HEAD:file > tmp > $ cat tmp > bar > > IMHO.
Yes, I'd either do it by default in general (my preference) or on request, but not based on tty.
Another point of input: You can do
git show commit <blob> <commit> <blob>
and also with other object types, of course. On the other hand, there is a single rev.diffopt. Besides the nuisance of having to track whether textconv has been specified explicitely and flipping the bit in rev.diffopt per argument (or adding a parameter), which is an implementation detail, it would mean that the default for different arguments in the argument list is different, depending on type. And that is a usablility issue, I would argue:
Is textconv on by default for git show? Yes and no, for some arguments yes, for others no.
That's what I want to cure ;)
Michael