From: Andreas Schwab Date: Mon, 17 Mar 2014 19:16:05 +0000 (+0100) Subject: grep: add grep.fullName config variable X-Git-Tag: v2.1.0-rc0~203^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6453f7b3486;p=thirdparty%2Fgit.git grep: add grep.fullName config variable This configuration variable sets the default for the --full-name option. Signed-off-by: Andreas Schwab Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index f83733490f..31811f16bd 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -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 ------- diff --git a/grep.c b/grep.c index c668034739..ece04bf275 100644 --- a/grep.c +++ b/grep.c @@ -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"))