Merge branch 'as/grep-fullname-config'

Add a configuration variable to force --full-name to be default for
"git grep".

This may cause regressions on scripted users that do not expect
this new behaviour.

* as/grep-fullname-config:
  grep: add grep.fullName config variable
This commit is contained in:
Junio C Hamano 2014-06-03 12:06:39 -07:00
commit 52df9173fa
2 changed files with 8 additions and 0 deletions

View File

@ -53,6 +53,9 @@ grep.extendedRegexp::
option is ignored when the 'grep.patternType' option is set to a value
other than 'default'.
grep.fullName::
If set to true, enable '--full-name' option by default.
OPTIONS
-------

5
grep.c
View File

@ -86,6 +86,11 @@ int grep_config(const char *var, const char *value, void *cb)
return 0;
}
if (!strcmp(var, "grep.fullname")) {
opt->relative = !git_config_bool(var, value);
return 0;
}
if (!strcmp(var, "color.grep"))
opt->color = git_config_colorbool(var, value);
else if (!strcmp(var, "color.grep.context"))