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
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
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
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"
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
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
6 matches
Mail list logo