{"thread":{"id":"18894","subject":"[PATCH] doc/gitattributes: clarify location of config text","startedAt":"2009-04-16T07:17:12Z","lastAt":"2009-04-16T07:17:12Z","messageCount":1,"participants":["Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"111426","messageId":"20090416071712.GA26567@coredump.intra.peff.net","threadId":"18894","inReplyTo":null,"subject":"[PATCH] doc/gitattributes: clarify location of config text","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-04-16T07:17:12Z","receivedAt":"2009-04-16T07:17:12Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The gitattributes documentation has a section on the \"diff\"\nattribute, with subsections for each of the things you might\nwant to configure in your diff config section (external\ndiff, hunk headers, etc). The first such subsection\nspecifically notes that the definition of the diff driver\nshould go into $GIT_DIR/config, but subsequent sections do\nnot.\n\nThis location is implied if you are reading the\ndocumentation sequentially, but it is not uncommon for a new\nuser to jump to (or be referred to) a specific section. For\na new user who does not know git well enough to recognize\nthe config syntax, it is not clear that those directives\ndon't also go into the gitattributes file.\n\nThis patch just mentions the config file in each subsection,\nsimilar to the way it is mentioned in the first.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nThis is a re-send of\n\n  http://article.gmane.org/gmane.comp.version-control.git/115866\n\nwhich seems to have just been missed.\n\n Documentation/gitattributes.txt |    9 ++++++---\n 1 files changed, 6 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\nindex b762bba..aaa073e 100644\n--- a/Documentation/gitattributes.txt\n+++ b/Documentation/gitattributes.txt\n@@ -297,7 +297,8 @@ for paths.\n \n Then, you would define a \"diff.tex.xfuncname\" configuration to\n specify a regular expression that matches a line that you would\n-want to appear as the hunk header \"TEXT\", like this:\n+want to appear as the hunk header \"TEXT\". Add a section to your\n+`$GIT_DIR/config` file (or `$HOME/.gitconfig` file) like this:\n \n ------------------------\n [diff \"tex\"]\n@@ -345,7 +346,8 @@ split words in a line, by specifying an appropriate regular expression\n in the \"diff.*.wordRegex\" configuration variable.  For example, in TeX\n a backslash followed by a sequence of letters forms a command, but\n several such commands can be run together without intervening\n-whitespace.  To separate them, use a regular expression such as\n+whitespace.  To separate them, use a regular expression in your\n+`$GIT_DIR/config` file (or `$HOME/.gitconfig` file) like this:\n \n ------------------------\n [diff \"tex\"]\n@@ -373,7 +375,8 @@ resulting text on stdout.\n \n For example, to show the diff of the exif information of a\n file instead of the binary information (assuming you have the\n-exif tool installed):\n+exif tool installed), add the following section to your\n+`$GIT_DIR/config` file (or `$HOME/.gitconfig` file):\n \n ------------------------\n [diff \"jpg\"]\n-- \n1.6.3.rc0.204.g6bb2\n"}]}