Re: [PATCHv3 3/7] show: honor --textconv for blobs

2013-05-15 Thread Jeff King
On Mon, May 13, 2013 at 04:57:55PM +0200, Michael J Gruber wrote: I don't think that it is a property of the file itself. That is, you do not say foo files are inherently uninteresting to git-show, and therefore we always convert them, whereas bar files do not have that property'. You say

Re: [PATCHv3 3/7] show: honor --textconv for blobs

2013-05-13 Thread Jeff King
On Sun, May 12, 2013 at 10:01:38PM -0700, Junio C Hamano wrote: Michael J Gruber g...@drmicha.warpmail.net writes: Adding to that: Somehow I still feel I should introduce a new attribute show (or a better name) similar to diff so that you can specifiy a diff driver to use for showing

Re: [PATCHv3 3/7] show: honor --textconv for blobs

2013-05-13 Thread Michael J Gruber
Jeff King venit, vidit, dixit 13.05.2013 13:55: On Sun, May 12, 2013 at 10:01:38PM -0700, Junio C Hamano wrote: Michael J Gruber g...@drmicha.warpmail.net writes: Adding to that: Somehow I still feel I should introduce a new attribute show (or a better name) similar to diff so that you

Re: [PATCHv3 3/7] show: honor --textconv for blobs

2013-05-13 Thread Junio C Hamano
Michael J Gruber g...@drmicha.warpmail.net writes: But you do have the possibility to use different drivers for diff and show. For example, for showing a file some sort of automatic pagination or line numbering can be helpful whereas it would hurt the diff case. I do not find the example

Re: [PATCHv3 3/7] show: honor --textconv for blobs

2013-05-12 Thread Michael J Gruber
Adding to that: Somehow I still feel I should introduce a new attribute show (or a better name) similar to diff so that you can specifiy a diff driver to use for showing a blob (or grepping it), which may or may not be the same you use for diff. This would be a much more fine-grained and

Re: [PATCHv3 3/7] show: honor --textconv for blobs

2013-05-12 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 11.05.2013 19:36: Michael J Gruber g...@drmicha.warpmail.net writes: + if (!DIFF_OPT_TOUCHED(rev-diffopt, ALLOW_TEXTCONV) || + !DIFF_OPT_TST(rev-diffopt, ALLOW_TEXTCONV)) + return stream_blob_to_fd(1, sha1, NULL, 0); It is surprising that

Re: [PATCHv3 3/7] show: honor --textconv for blobs

2013-05-12 Thread Junio C Hamano
Michael J Gruber g...@drmicha.warpmail.net writes: Adding to that: Somehow I still feel I should introduce a new attribute show (or a better name) similar to diff so that you can specifiy a diff driver to use for showing a blob (or grepping it), which may or may not be the same you use for

Re: [PATCHv3 3/7] show: honor --textconv for blobs

2013-05-11 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 10.05.2013 19:02: Michael J Gruber g...@drmicha.warpmail.net writes: Currently, diff and cat-file for blobs honor --textconv options (with the former defaulting to --textconv and the latter to --no-textconv) whereas show does not honor this option, even

Re: [PATCHv3 3/7] show: honor --textconv for blobs

2013-05-11 Thread Junio C Hamano
Michael J Gruber g...@drmicha.warpmail.net writes: + if (!DIFF_OPT_TOUCHED(rev-diffopt, ALLOW_TEXTCONV) || + !DIFF_OPT_TST(rev-diffopt, ALLOW_TEXTCONV)) + return stream_blob_to_fd(1, sha1, NULL, 0); It is surprising that the necessary change is only this, but I think it

Re: [PATCHv3 3/7] show: honor --textconv for blobs

2013-05-10 Thread Junio C Hamano
Michael J Gruber g...@drmicha.warpmail.net writes: Currently, diff and cat-file for blobs honor --textconv options (with the former defaulting to --textconv and the latter to --no-textconv) whereas show does not honor this option, even though it takes diff options. Make show on blobs behave

Re: [PATCHv3 3/7] show: honor --textconv for blobs

2013-05-10 Thread Jeff King
On Fri, May 10, 2013 at 10:02:51AM -0700, Junio C Hamano wrote: Make show on blobs behave like diff, i.e. honor --textconv by default and --no-textconv when given. [...] So show on blobs does show the raw contents by default, but the user can explicitly ask to enable textconv with

Re: [PATCHv3 3/7] show: honor --textconv for blobs

2013-05-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Fri, May 10, 2013 at 10:02:51AM -0700, Junio C Hamano wrote: Make show on blobs behave like diff, i.e. honor --textconv by default and --no-textconv when given. [...] So show on blobs does show the raw contents by default, but the user can explicitly