{"thread":{"id":"36134","subject":"[PATCH] Add grep.fullName config variable","startedAt":"2014-03-12T07:11:09Z","lastAt":"2014-03-12T07:11:09Z","messageCount":1,"participants":["Andreas Schwab"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"236562","messageId":"87r467q4c2.fsf@igel.home","threadId":"36134","inReplyTo":null,"subject":"[PATCH] Add grep.fullName config variable","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2014-03-12T07:11:09Z","receivedAt":"2014-03-12T07:11:09Z","isPatch":true,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"This configuration variable sets the default for the --full-name option.\n\nSigned-off-by: Andreas Schwab <schwab@linux-m68k.org>\n---\n Documentation/git-grep.txt | 3 +++\n grep.c                     | 5 +++++\n 2 files changed, 8 insertions(+)\n\ndiff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt\nindex f837334..31811f1 100644\n--- a/Documentation/git-grep.txt\n+++ b/Documentation/git-grep.txt\n@@ -53,6 +53,9 @@ grep.extendedRegexp::\n \toption is ignored when the 'grep.patternType' option is set to a value\n \tother than 'default'.\n \n+grep.fullName::\n+\tIf set to true, enable '--full-name' option by default.\n+\n \n OPTIONS\n -------\ndiff --git a/grep.c b/grep.c\nindex c668034..ece04bf 100644\n--- a/grep.c\n+++ b/grep.c\n@@ -86,6 +86,11 @@ int grep_config(const char *var, const char *value, void *cb)\n \t\treturn 0;\n \t}\n \n+\tif (!strcmp(var, \"grep.fullname\")) {\n+\t\topt->relative = !git_config_bool(var, value);\n+\t\treturn 0;\n+\t}\n+\n \tif (!strcmp(var, \"color.grep\"))\n \t\topt->color = git_config_colorbool(var, value);\n \telse if (!strcmp(var, \"color.grep.context\"))\n-- \n1.9.0\n\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"}]}