Re: [RFC/PATCH 1/4] show: obey --textconv for blobs

2013-02-07 Thread Jeff King
On Thu, Feb 07, 2013 at 10:34:26AM +0100, Michael J Gruber wrote: > > Just as we record the path from the surrounding tree, we record the > > mode. It's that mode which gets put into the pending object list by the > > revision parser (see the very end of handle_revision_arg). Storing an > > object

Re: [RFC/PATCH 1/4] show: obey --textconv for blobs

2013-02-07 Thread Michael J Gruber
Jeff King venit, vidit, dixit 07.02.2013 10:11: > On Thu, Feb 07, 2013 at 10:05:26AM +0100, Michael J Gruber wrote: > >>> Would it be better if object_array_entry replaced its "mode" member with >>> an object_context? >> >> Do all callers/users want to deal with object_context? > > Wouldn't it ju

Re: [RFC/PATCH 1/4] show: obey --textconv for blobs

2013-02-07 Thread Jeff King
On Thu, Feb 07, 2013 at 10:05:26AM +0100, Michael J Gruber wrote: > > Would it be better if object_array_entry replaced its "mode" member with > > an object_context? > > Do all callers/users want to deal with object_context? Wouldn't it just mean replacing "entry->mode" with "entry->oc.mode" at

Re: [RFC/PATCH 1/4] show: obey --textconv for blobs

2013-02-07 Thread Michael J Gruber
Jeff King venit, vidit, dixit 06.02.2013 23:06: > On Wed, Feb 06, 2013 at 04:08:50PM +0100, Michael J Gruber wrote: > >> diff --git a/builtin/log.c b/builtin/log.c >> index 8f0b2e8..f83870d 100644 >> --- a/builtin/log.c >> +++ b/builtin/log.c >> @@ -402,10 +402,28 @@ static void show_tagger(char *

Re: [RFC/PATCH 1/4] show: obey --textconv for blobs

2013-02-07 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 06.02.2013 17:53: > Michael J Gruber writes: > >> 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 >> i

Re: [RFC/PATCH 1/4] show: obey --textconv for blobs

2013-02-06 Thread Junio C Hamano
Jeff King writes: > git-show should probably have the same option. I doubt it should be on > by default, but I can see it being useful for: > > git show --to-filesystem HEAD:Makefile >Makefile > > or whatever. I don't think those features necessarily need to come as > part of Michael's series.

Re: [RFC/PATCH 1/4] show: obey --textconv for blobs

2013-02-06 Thread Jeff King
On Wed, Feb 06, 2013 at 03:49:44PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > And stating it that way makes it clear that there may be other missing > > steps (3 and up) to apply other gitattributes. For example, should "git > > show $blob" respect crlf attributes? Smudge filters? >

Re: [RFC/PATCH 1/4] show: obey --textconv for blobs

2013-02-06 Thread Junio C Hamano
Jeff King writes: > And stating it that way makes it clear that there may be other missing > steps (3 and up) to apply other gitattributes. For example, should "git > show $blob" respect crlf attributes? Smudge filters? Yeah, I think applying these when path is availble may make sense. Are we g

Re: [RFC/PATCH 1/4] show: obey --textconv for blobs

2013-02-06 Thread Jeff King
On Wed, Feb 06, 2013 at 08:53:52AM -0800, Junio C Hamano wrote: > Michael J Gruber writes: > > > 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, e

Re: [RFC/PATCH 1/4] show: obey --textconv for blobs

2013-02-06 Thread Jeff King
On Wed, Feb 06, 2013 at 04:08:50PM +0100, Michael J Gruber wrote: > diff --git a/builtin/log.c b/builtin/log.c > index 8f0b2e8..f83870d 100644 > --- a/builtin/log.c > +++ b/builtin/log.c > @@ -402,10 +402,28 @@ static void show_tagger(char *buf, int len, struct > rev_info *rev) > strbuf_rel

Re: [RFC/PATCH 1/4] show: obey --textconv for blobs

2013-02-06 Thread Junio C Hamano
Michael J Gruber writes: > 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 "d

[RFC/PATCH 1/4] show: obey --textconv for blobs

2013-02-06 Thread Michael J Gruber
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 defaul