[PATCH] diff: diff.context configuration gives default to -U

2012-10-19 Thread Jeff Muizelaar
Introduce a configuration variable diff.context that tells Porcelain commands to use a non-default number of context lines instead of 3 (the default). With this variable, users do not have to keep repeating "git log -U8" from the command line; instead, it becomes sufficient to say "git config diff

Re: [PATCH] diff: diff.context configuration gives default to -U

2012-09-27 Thread Junio C Hamano
Jeff Muizelaar writes: > + if (!strcmp(var, "diff.context")) { > + diff_context_default = git_config_int(var, value); > + if (diff_context_default < 0) > + return -1; > + return 0; I am somewhat torn on this part. This fails the entire

[PATCH] diff: diff.context configuration gives default to -U

2012-09-27 Thread Jeff Muizelaar
Introduce a configuration variable diff.context that tells Porcelain commands to use a non-default number of context lines instead of 3 (the default). With this variable, users do not have to keep repeating "git log -U8" from the command line; instead, it becomes sufficient to say "git config diff

Re: [PATCH] diff: diff.context configuration gives default to -U

2012-09-27 Thread Jeff King
On Thu, Sep 27, 2012 at 10:40:26AM -0700, Junio C Hamano wrote: > > +test_expect_success 'diff.context affects log' ' > > + git log -1 -p | grep -q -v firstline > > + git config diff.context 8 && > > + git log -1 -p | grep -q firstline > > +' > > Three points: > > - Please avoid "grep -q"

Re: [PATCH] diff: diff.context configuration gives default to -U

2012-09-27 Thread Junio C Hamano
Jeff Muizelaar writes: > Introduce a configuration variable diff.context that tells > Porcelain commands to use a non-default number of context > lines instead of 3 (the default). With this variable, users > do not have to keep repeating "git log -U8" from the command > line; instead, it becomes

[PATCH] diff: diff.context configuration gives default to -U

2012-09-27 Thread Jeff Muizelaar
Introduce a configuration variable diff.context that tells Porcelain commands to use a non-default number of context lines instead of 3 (the default). With this variable, users do not have to keep repeating "git log -U8" from the command line; instead, it becomes sufficient to say "git config diff