From: Michael J Gruber Date: Sat, 20 Apr 2013 13:38:53 GMT Subject: Re: [PATCH 2/6] show: obey --textconv for blobs Message-ID: <51729A6D.3030501@drmicha.warpmail.net> In-Reply-To: <20130420040643.GB24970@sigill.intra.peff.net> Jeff King venit, vidit, dixit 20.04.2013 06:06: > On Fri, Apr 19, 2013 at 06:44:45PM +0200, Michael J Gruber wrote: > >> Currently, "diff" and "cat-file" for blobs obey "--textconv" options >> (with the former defaulting to "--textconv" and the latter to >> "--no-textconv") whereas "show" does not obey this option, even though >> it takes diff options. >> >> Make "show" on blobs behave like "diff", i.e. obey "--textconv" by >> default and "--no-textconv" when given. > > Wait, this does the opposite of the last patch. If we do want to do > this, shouldn't the last one have been an "expect_failure"? The last patch just documents the status quo, which is not a bug per se. Therefore, no failure, but change in the definition of "success". > I'm not convinced this is the right thing to do, though. It would break: > > git show HEAD:file.c >file.c > > Admittedly, such people should be using "checkout" or "cat-file", so I > do not mind too much breaking them if there is a good reason. But I am > not sure what that reason is. My reasoning is twofold: - consistency between "git show commit" and "git show blob" - "git show" is a user facing command, and as such should produce output consumable by humans; whereas "git cat-file" is plumbing and should produce raw data unless told otherwise (-p, --textconv). (Sorry for the repeat.) Michael