{"thread":{"id":"9131","subject":"[PATCH] Documentation/gitignore.txt: Fix the seriously misleading priority explanation","startedAt":"2007-07-21T23:53:49Z","lastAt":"2007-07-22T09:12:03Z","messageCount":3,"participants":["David Kastrup","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"48078","messageId":"85wswtp8va.fsf@lola.goethe.zz","threadId":"9131","inReplyTo":null,"subject":"[PATCH] Documentation/gitignore.txt: Fix the seriously misleading priority explanation","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2007-07-21T23:53:49Z","receivedAt":"2007-07-21T23:53:49Z","isPatch":true,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"\n\nSigned-off-by: David Kastrup <dak@gnu.org>\n---\n Documentation/gitignore.txt |   22 ++++++++++++++--------\n 1 files changed, 14 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt\nindex ea79d74..9c83095 100644\n--- a/Documentation/gitignore.txt\n+++ b/Documentation/gitignore.txt\n@@ -18,21 +18,26 @@ pattern.\n \n When deciding whether to ignore a path, git normally checks\n `gitignore` patterns from multiple sources, with the following\n-order of precedence:\n+order of precedence, from highest to lowest (within one level of\n+precedence, the last matching pattern decides the outcome):\n \n- * Patterns read from the file specified by the configuration\n-   variable 'core.excludesfile'.\n-\n- * Patterns read from `$GIT_DIR/info/exclude`.\n+ * Patterns read from the command line for those commands that support\n+   them.\n \n  * Patterns read from a `.gitignore` file in the same directory\n-   as the path, or in any parent directory, ordered from the\n-   deepest such file to a file in the root of the repository.\n+   as the path, or in any parent directory, with patterns in the\n+   higher level files (up to the root) being overriden by those in\n+   lower level files down to the directory containing the file.\n    These patterns match relative to the location of the\n    `.gitignore` file.  A project normally includes such\n    `.gitignore` files in its repository, containing patterns for\n    files generated as part of the project build.\n \n+ * Patterns read from `$GIT_DIR/info/exclude`.\n+\n+ * Patterns read from the file specified by the configuration\n+   variable 'core.excludesfile'.\n+\n The underlying git plumbing tools, such as\n gitlink:git-ls-files[1] and gitlink:git-read-tree[1], read\n `gitignore` patterns specified by command-line options, or from\n@@ -49,7 +54,8 @@ Patterns have the following format:\n \n  - An optional prefix '!' which negates the pattern; any\n    matching file excluded by a previous pattern will become\n-   included again.\n+   included again.  If a negated pattern matches, this will\n+   override lower precedence patterns sources.\n \n  - If the pattern does not contain a slash '/', git treats it as\n    a shell glob pattern and checks for a match against the\n-- \n1.5.2.3\n\n\n-- \nDavid Kastrup, Kriemhildstr. 15, 44793 Bochum\n"},{"id":"48093","messageId":"7v4pjxt1nk.fsf@assigned-by-dhcp.cox.net","threadId":"9131","inReplyTo":"85wswtp8va.fsf@lola.goethe.zz","subject":"Re: [PATCH] Documentation/gitignore.txt: Fix the seriously misleading priority explanation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-22T06:04:15Z","receivedAt":"2007-07-22T06:04:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Your rewrite makes \"patterns found in deeper file overrides the\nones in shallower ones\" rule much much easier to read.  Thanks.\n"},{"id":"48113","messageId":"85wswsol98.fsf@lola.goethe.zz","threadId":"9131","inReplyTo":"7v4pjxt1nk.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Documentation/gitignore.txt: Fix the seriously misleading priority explanation","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2007-07-22T09:12:03Z","receivedAt":"2007-07-22T09:12:03Z","isPatch":true,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Your rewrite makes \"patterns found in deeper file overrides the\n> ones in shallower ones\" rule much much easier to read.  Thanks.\n\nWell, it is nice for a change to be able to explain something in a way\nthat people understand.\n\n-- \nDavid Kastrup, Kriemhildstr. 15, 44793 Bochum\n"}]}