summaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-06-03 12:06:39 -0700
committerJunio C Hamano <gitster@pobox.com>2014-06-03 12:06:39 -0700
commit52df9173fa9b409a96c02a62b06d2b19f4ff5d0f (patch)
tree7ac8a27e4697ed664501bbff94a1f76a2d834a5f /grep.c
parentbce14aa132e0064d9a9b1c7ad98e71e22c6e0272 (diff)
parent6453f7b34864c1a639cc367f576476ee3be1456f (diff)
downloadgit-52df9173fa9b409a96c02a62b06d2b19f4ff5d0f.tar.gz
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
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/grep.c b/grep.c
index 4aef0a69d0..99217dc04f 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"))