{"thread":{"id":"56042","subject":"[PATCH] docs: .gitignore in parents is current repo only","startedAt":"2021-07-02T22:21:00Z","lastAt":"2021-07-19T19:15:03Z","messageCount":16,"participants":["Andrew Berry","Junio C Hamano","Bagas Sanjaya"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"429085","messageId":"20210702222044.72767-1-andrew@furrypaws.ca","threadId":"56042","inReplyTo":null,"subject":"[PATCH] docs: .gitignore in parents is current repo only","fromName":"Andrew Berry","fromEmail":"andrew@furrypaws.ca","sentAt":"2021-07-02T22:20:44Z","receivedAt":"2021-07-02T22:21:00Z","isPatch":true,"sender":{"key":"andrew@furrypaws.ca","avatar":"https://avatars.githubusercontent.com/u/255023?v=4"},"body":"The current documentation reads as if .gitignore files will be parsed in\nevery parent directory, and not until they reach a repository boundary.\nThis clarifies the current behaviour.\n\nSigned-off-by: Andrew Berry <andrew@furrypaws.ca>\n---\n Documentation/gitignore.txt | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt\nindex 53e7d5c914..534cda5747 100644\n--- a/Documentation/gitignore.txt\n+++ b/Documentation/gitignore.txt\n@@ -27,10 +27,10 @@ precedence, the last matching pattern decides the outcome):\n    them.\n \n  * Patterns read from a `.gitignore` file in the same directory\n-   as the path, or in any parent directory, with patterns in the\n-   higher level files (up to the toplevel of the work tree) being overridden\n-   by those in lower level files down to the directory containing the file.\n-   These patterns match relative to the location of the\n+   as the path, or in any parent directory in the same repository, with\n+   patterns in the higher level files (up to the toplevel of the work tree)\n+   being overridden by those in lower level files down to the directory\n+   containing the file. 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-- \n2.31.1\n\n"},{"id":"429092","messageId":"xmqqzgv4ntup.fsf@gitster.g","threadId":"56042","inReplyTo":"20210702222044.72767-1-andrew@furrypaws.ca","subject":"Re: [PATCH] docs: .gitignore in parents is current repo only","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-03T00:06:54Z","receivedAt":"2021-07-03T00:06:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andrew Berry <andrew@furrypaws.ca> writes:\n\n> The current documentation reads as if .gitignore files will be parsed in\n> every parent directory, and not until they reach a repository boundary.\n\nHmph.  While it is not adding an incorrect information to the\ndocumentation per-se, I am not sure if this is necessary to begin\nwith.  I would have thought that \"up to the toplevel of the work\ntree\" would be sufficiently clear where the upward traversal of the\ndirectories ends, i.e. at the repository boundary.\n\n>   * Patterns read from a `.gitignore` file in the same directory\n> -   as the path, or in any parent directory, with patterns in the\n> -   higher level files (up to the toplevel of the work tree) being overridden\n> -   by those in lower level files down to the directory containing the file.\n> -   These patterns match relative to the location of the\n> +   as the path, or in any parent directory in the same repository, with\n> +   patterns in the higher level files (up to the toplevel of the work tree)\n> +   being overridden by those in lower level files down to the directory\n> +   containing the file. 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"},{"id":"429093","messageId":"b9da43a8-897b-7cce-ecbc-ea56078f0f09@gmail.com","threadId":"56042","inReplyTo":"20210702222044.72767-1-andrew@furrypaws.ca","subject":"Re: [PATCH] docs: .gitignore in parents is current repo only","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-07-03T00:21:02Z","receivedAt":"2021-07-03T00:21:09Z","isPatch":true,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"On 03/07/21 05.20, Andrew Berry wrote:\n>    * Patterns read from a `.gitignore` file in the same directory\n> -   as the path, or in any parent directory, with patterns in the\n> -   higher level files (up to the toplevel of the work tree) being overridden\n> -   by those in lower level files down to the directory containing the file.\n> -   These patterns match relative to the location of the\n> +   as the path, or in any parent directory in the same repository, with\n> +   patterns in the higher level files (up to the toplevel of the work tree)\n> +   being overridden by those in lower level files down to the directory\n> +   containing the file. These patterns match relative to the location of the\n\nSo for example I have `something/foo` in ../.gitignore, but .gitignore \n(in current directory `something`) has `foo`. Is .gitignore from current \ndirectory or ../.gitignore takes effect?\n\nAlso s/toplevel/top level/\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"},{"id":"429250","messageId":"889D9AD1-1114-49B4-ADB0-BF78160743E4@furrypaws.ca","threadId":"56042","inReplyTo":"b9da43a8-897b-7cce-ecbc-ea56078f0f09@gmail.com","subject":"Re: [PATCH] docs: .gitignore in parents is current repo only","fromName":"Andrew Berry","fromEmail":"andrew@furrypaws.ca","sentAt":"2021-07-05T17:30:50Z","receivedAt":"2021-07-05T17:30:59Z","isPatch":true,"sender":{"key":"andrew@furrypaws.ca","avatar":"https://avatars.githubusercontent.com/u/255023?v=4"},"body":"On 2 Jul 2021, at 20:06, Junio C Hamano wrote:\n\n> I would have thought that \"up to the toplevel of the work\n> tree\" would be sufficiently clear where the upward traversal of the\n> directories ends, i.e. at the repository boundary.\n\nSeems reasonable. What if we move that note to come after \"any parent \ndirectory\"?\n\nOn 2 Jul 2021, at 20:21, Bagas Sanjaya wrote:\n\n> So for example I have `something/foo` in ../.gitignore, but .gitignore \n> (in current directory `something`) has `foo`. Is .gitignore from \n> current directory or ../.gitignore takes effect?\n\nIn this case, both rules resolve to the same path, so I don't think it \nmatters? But in practice I'd expect it to be `something/.gitignore`, \nsince you can negate the pattern from the parent ignore file.\n\n> Also s/toplevel/top level/\n\nThat showed up in the diff due to word wrapping. If no other changes are \naccepted, I'll file a followup after to get this fixed on it's own.\n"},{"id":"429259","messageId":"xmqq4kd8mt05.fsf@gitster.g","threadId":"56042","inReplyTo":"889D9AD1-1114-49B4-ADB0-BF78160743E4@furrypaws.ca","subject":"Re: [PATCH] docs: .gitignore in parents is current repo only","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-05T19:59:38Z","receivedAt":"2021-07-05T19:59:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Andrew Berry\" <andrew@furrypaws.ca> writes:\n\n> On 2 Jul 2021, at 20:06, Junio C Hamano wrote:\n>\n>> I would have thought that \"up to the toplevel of the work\n>> tree\" would be sufficiently clear where the upward traversal of the\n>> directories ends, i.e. at the repository boundary.\n>\n> Seems reasonable. What if we move that note to come after \"any parent\n> directory\"?\n\nMeaning something like the following?\n\nI do agree that it makes it a lot clearer.\n\n Documentation/gitignore.txt | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git c/Documentation/gitignore.txt w/Documentation/gitignore.txt\nindex 53e7d5c914..58c2e41bbe 100644\n--- c/Documentation/gitignore.txt\n+++ w/Documentation/gitignore.txt\n@@ -27,8 +27,8 @@ precedence, the last matching pattern decides the outcome):\n    them.\n \n  * Patterns read from a `.gitignore` file in the same directory\n-   as the path, or in any parent directory, with patterns in the\n-   higher level files (up to the toplevel of the work tree) being overridden\n+   as the path, or in any parent directory (up to the toplevel of\n+   the work tree), with patterns in the higher level files being overridden\n    by those in 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"},{"id":"429272","messageId":"54FBABC9-2BDF-4879-AB5A-BAE4E8179D80@furrypaws.ca","threadId":"56042","inReplyTo":"xmqq4kd8mt05.fsf@gitster.g","subject":"Re: [PATCH] docs: .gitignore in parents is current repo only","fromName":"Andrew Berry","fromEmail":"andrew@furrypaws.ca","sentAt":"2021-07-05T23:50:19Z","receivedAt":"2021-07-05T23:50:30Z","isPatch":true,"sender":{"key":"andrew@furrypaws.ca","avatar":"https://avatars.githubusercontent.com/u/255023?v=4"},"body":"On 5 Jul 2021, at 15:59, Junio C Hamano wrote:\n\n> \"Andrew Berry\" <andrew@furrypaws.ca> writes:\n>\n> Meaning something like the following?\n>\n> I do agree that it makes it a lot clearer.\n>\n>  Documentation/gitignore.txt | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git c/Documentation/gitignore.txt w/Documentation/gitignore.txt\n> index 53e7d5c914..58c2e41bbe 100644\n> --- c/Documentation/gitignore.txt\n> +++ w/Documentation/gitignore.txt\n> @@ -27,8 +27,8 @@ precedence, the last matching pattern decides the \n> outcome):\n>     them.\n>\n>   * Patterns read from a `.gitignore` file in the same directory\n> -   as the path, or in any parent directory, with patterns in the\n> -   higher level files (up to the toplevel of the work tree) being \n> overridden\n> +   as the path, or in any parent directory (up to the toplevel of\n> +   the work tree), with patterns in the higher level files being \n> overridden\n>     by those in lower level files down to the directory containing the \n> file.\n>     These patterns match relative to the location of the\n>     `.gitignore` file.  A project normally includes such\n\nYes, that's good. My only suggestion would mirror the earlier one, to \nsplit toplevel to \"top-level\" or \"top level\".\n"},{"id":"429299","messageId":"xmqqczrvl8kl.fsf@gitster.g","threadId":"56042","inReplyTo":"54FBABC9-2BDF-4879-AB5A-BAE4E8179D80@furrypaws.ca","subject":"Re: [PATCH] docs: .gitignore in parents is current repo only","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-06T16:18:34Z","receivedAt":"2021-07-06T16:18:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Andrew Berry\" <andrew@furrypaws.ca> writes:\n\n> split toplevel to \"top-level\" or \"top level\".\n\nAh, that's even better.\n"},{"id":"429349","messageId":"20210706205439.75015-1-andrew@furrypaws.ca","threadId":"56042","inReplyTo":"xmqqczrvl8kl.fsf@gitster.g","subject":"[PATCH] docs: .gitignore parsing is to the top of the repo","fromName":"Andrew Berry","fromEmail":"andrew@furrypaws.ca","sentAt":"2021-07-06T20:54:39Z","receivedAt":"2021-07-06T20:55:19Z","isPatch":true,"sender":{"key":"andrew@furrypaws.ca","avatar":"https://avatars.githubusercontent.com/u/255023?v=4"},"body":"The current documentation reads as if .gitignore files will be parsed in\nevery parent directory, and not until they reach a repository boundary.\nThis clarifies the current behaviour.\n\nAs well, this corrects 'toplevel' to 'top-level', matching usage for\n'top-level domain'.\n\nSigned-off-by: Andrew Berry <andrew@furrypaws.ca>\n---\n Documentation/gitignore.txt | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt\nindex 53e7d5c914..534cda5747 100644\n--- a/Documentation/gitignore.txt\n+++ b/Documentation/gitignore.txt\n@@ -27,10 +27,10 @@ precedence, the last matching pattern decides the outcome):\n    them.\n \n  * Patterns read from a `.gitignore` file in the same directory\n-   as the path, or in any parent directory, with patterns in the\n-   higher level files (up to the toplevel of the work tree) being overridden\n-   by those in lower level files down to the directory containing the file.\n-   These patterns match relative to the location of the\n+   as the path, or in any parent directory in the same repository, with\n+   patterns in the higher level files (up to the toplevel of the work tree)\n+   being overridden by those in lower level files down to the directory\n+   containing the file. 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-- \n2.31.1\n\n"},{"id":"429351","messageId":"20210706205712.75270-1-andrew@furrypaws.ca","threadId":"56042","inReplyTo":"20210706205439.75015-1-andrew@furrypaws.ca","subject":"[PATCH] docs: .gitignore parsing is to the top of the repo","fromName":"Andrew Berry","fromEmail":"andrew@furrypaws.ca","sentAt":"2021-07-06T20:57:12Z","receivedAt":"2021-07-06T20:57:58Z","isPatch":true,"sender":{"key":"andrew@furrypaws.ca","avatar":"https://avatars.githubusercontent.com/u/255023?v=4"},"body":"The current documentation reads as if .gitignore files will be parsed in\nevery parent directory, and not until they reach a repository boundary.\nThis clarifies the current behaviour.\n\nAs well, this corrects 'toplevel' to 'top-level', matching usage for\n'top-level domain'.\n\nSigned-off-by: Andrew Berry <andrew@furrypaws.ca>\n---\n Documentation/gitignore.txt | 11 +++++------\n 1 file changed, 5 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt\nindex 53e7d5c914..af8f231cc1 100644\n--- a/Documentation/gitignore.txt\n+++ b/Documentation/gitignore.txt\n@@ -27,12 +27,11 @@ precedence, the last matching pattern decides the outcome):\n    them.\n \n  * Patterns read from a `.gitignore` file in the same directory\n-   as the path, or in any parent directory, with patterns in the\n-   higher level files (up to the toplevel of the work tree) being overridden\n-   by those in 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+   as the path, or in any parent directory (up to the top-level of the work\n+   tree), with patterns in the higher level files being overridden by those in\n+   lower level files down to the directory containing the file. These patterns\n+   match relative to the location of the `.gitignore` file.  A project normally\n+   includes such `.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-- \n2.31.1\n\n"},{"id":"429364","messageId":"xmqqo8bfgl9r.fsf@gitster.g","threadId":"56042","inReplyTo":"20210706205439.75015-1-andrew@furrypaws.ca","subject":"Re: [PATCH] docs: .gitignore parsing is to the top of the repo","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-06T21:55:28Z","receivedAt":"2021-07-06T21:55:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andrew Berry <andrew@furrypaws.ca> writes:\n\n> The current documentation reads as if .gitignore files will be parsed in\n> every parent directory, and not until they reach a repository boundary.\n> This clarifies the current behaviour.\n>\n> As well, this corrects 'toplevel' to 'top-level', matching usage for\n> 'top-level domain'.\n>\n> Signed-off-by: Andrew Berry <andrew@furrypaws.ca>\n> ---\n>  Documentation/gitignore.txt | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n>\n> diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt\n> index 53e7d5c914..534cda5747 100644\n> --- a/Documentation/gitignore.txt\n> +++ b/Documentation/gitignore.txt\n> @@ -27,10 +27,10 @@ precedence, the last matching pattern decides the outcome):\n>     them.\n>  \n>   * Patterns read from a `.gitignore` file in the same directory\n> -   as the path, or in any parent directory, with patterns in the\n> -   higher level files (up to the toplevel of the work tree) being overridden\n> -   by those in lower level files down to the directory containing the file.\n> -   These patterns match relative to the location of the\n> +   as the path, or in any parent directory in the same repository, with\n> +   patterns in the higher level files (up to the toplevel of the work tree)\n> +   being overridden by those in lower level files down to the directory\n> +   containing the file. 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\nSent a wrong/stale patch?\n\n"},{"id":"429365","messageId":"xmqqk0m3gl6a.fsf@gitster.g","threadId":"56042","inReplyTo":"20210706205712.75270-1-andrew@furrypaws.ca","subject":"Re: [PATCH] docs: .gitignore parsing is to the top of the repo","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-06T21:57:33Z","receivedAt":"2021-07-06T21:57:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andrew Berry <andrew@furrypaws.ca> writes:\n\n>   * Patterns read from a `.gitignore` file in the same directory\n> -   as the path, or in any parent directory, with patterns in the\n> -   higher level files (up to the toplevel of the work tree) being overridden\n> -   by those in 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> +   as the path, or in any parent directory (up to the top-level of the work\n> +   tree), with patterns in the higher level files being overridden by those in\n> +   lower level files down to the directory containing the file. These patterns\n> +   match relative to the location of the `.gitignore` file.  A project normally\n> +   includes such `.gitignore` files in its repository, containing patterns for\n>     files generated as part of the project build.\n\nLine rewrapping makes it hard to see what actually got changed, but\ndoes this only move \"(up to the top-level of the work tree)\" around\nwithout anything else, as discussed?\n\nIf you do \"toplevel\" -> \"top-level\" while at it, perhaps we would\nwant to correct \"work tree\" -> \"working tree\".\n\nLooking better.\n\nThanks.\n"},{"id":"429379","messageId":"xmqqr1gbf02i.fsf@gitster.g","threadId":"56042","inReplyTo":"xmqqk0m3gl6a.fsf@gitster.g","subject":"Re: [PATCH] docs: .gitignore parsing is to the top of the repo","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-07T00:18:45Z","receivedAt":"2021-07-07T00:18:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Andrew Berry <andrew@furrypaws.ca> writes:\n>\n>>   * Patterns read from a `.gitignore` file in the same directory\n>> -   as the path, or in any parent directory, with patterns in the\n>> -   higher level files (up to the toplevel of the work tree) being overridden\n>> -   by those in 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>> +   as the path, or in any parent directory (up to the top-level of the work\n>> +   tree), with patterns in the higher level files being overridden by those in\n>> +   lower level files down to the directory containing the file. These patterns\n>> +   match relative to the location of the `.gitignore` file.  A project normally\n>> +   includes such `.gitignore` files in its repository, containing patterns for\n>>     files generated as part of the project build.\n>\n> Line rewrapping makes it hard to see what actually got changed, but\n> does this only move \"(up to the top-level of the work tree)\" around\n> without anything else, as discussed?\n>\n> If you do \"toplevel\" -> \"top-level\" while at it, perhaps we would\n> want to correct \"work tree\" -> \"working tree\".\n>\n> Looking better.\n\nAnother tangent.  The discovery process used for the .gitattributes\nfiles is identical to what is done to the .gitignore files; we may\nwant to make sure that the explanation we give in our documentation\nwon't cause the same confusion you are trying to avoid with this\nchange.  Such a fix does not have to be (and probably should not be)\na part of this change, though.\n\nThanks.\n"},{"id":"429381","messageId":"CA0F1460-CB39-45DC-8DED-13F7ABA674D1@furrypaws.ca","threadId":"56042","inReplyTo":"xmqqr1gbf02i.fsf@gitster.g","subject":"Re: [PATCH] docs: .gitignore parsing is to the top of the repo","fromName":"Andrew Berry","fromEmail":"andrew@furrypaws.ca","sentAt":"2021-07-07T00:32:52Z","receivedAt":"2021-07-07T00:32:55Z","isPatch":true,"sender":{"key":"andrew@furrypaws.ca","avatar":"https://avatars.githubusercontent.com/u/255023?v=4"},"body":"On 6 Jul 2021, at 20:18, Junio C Hamano wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>>\n>> Line rewrapping makes it hard to see what actually got changed,\n\nTo check, that's asked for, correct? Or is it better to do one commit \nwith the word changes, another to clean up the wrapping?\n\n>> but\n>> does this only move \"(up to the top-level of the work tree)\" around\n>> without anything else, as discussed?\n>>\n>> If you do \"toplevel\" -> \"top-level\" while at it, perhaps we would\n>> want to correct \"work tree\" -> \"working tree\".\n>>\n>> Looking better.\n\nYes, I realized I sent the wrong file when reviewing the sent email, \nhence the followup. Aside, it's not clear to me how to send patch emails \nthat _also_ have not-to-be-committed notes like \"oops, ignore the last\". \nFirst time contributor problems!\n\n> Another tangent.  The discovery process used for the .gitattributes\n> files is identical to what is done to the .gitignore files; we may\n> want to make sure that the explanation we give in our documentation\n> won't cause the same confusion you are trying to avoid with this\n> change.  Such a fix does not have to be (and probably should not be)\n> a part of this change, though.\n\nI'm out of the office for the next week, but otherwise I'm glad to take \nthat on when I'm back if no one else picks it up.\n"},{"id":"429385","messageId":"xmqqh7h6gbs4.fsf@gitster.g","threadId":"56042","inReplyTo":"CA0F1460-CB39-45DC-8DED-13F7ABA674D1@furrypaws.ca","subject":"Re: [PATCH] docs: .gitignore parsing is to the top of the repo","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-07T01:20:27Z","receivedAt":"2021-07-07T01:20:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Andrew Berry\" <andrew@furrypaws.ca> writes:\n\n>>> Line rewrapping makes it hard to see what actually got changed,\n>\n> To check, that's asked for, correct? Or is it better to do one commit\n> with the word changes, another to clean up the wrapping?\n\nWe do not encourage one-word-per-line or other silliness, but as\nlong as the source is readable enough, there is no need for line\nre-wrapping, and I suspect that principle would apply.\n\n>> Another tangent.  The discovery process used for the .gitattributes\n>> files is identical to what is done to the .gitignore files; we may\n>> want to make sure that the explanation we give in our documentation\n>> won't cause the same confusion you are trying to avoid with this\n>> change.  Such a fix does not have to be (and probably should not be)\n>> a part of this change, though.\n>\n> I'm out of the office for the next week, but otherwise I'm glad to\n> take that on when I'm back if no one else picks it up.\n\nHere is how we describe the .gitattributes side:\n\n    When deciding what attributes are assigned to a path, Git\n    consults `$GIT_DIR/info/attributes` file (which has the highest\n    precedence), `.gitattributes` file in the same directory as the\n    path in question, and its parent directories up to the toplevel of the\n    work tree (the further the directory that contains `.gitattributes`\n    is from the path in question, the lower its precedence). Finally\n    global and system-wide files are considered (they have the lowest\n    precedence).\n\nI think we are already good on this side.\n\nThanks.\n"},{"id":"430466","messageId":"52880F2B-FAD4-4E36-8662-A798B91B5C94@furrypaws.ca","threadId":"56042","inReplyTo":"xmqqk0m3gl6a.fsf@gitster.g","subject":"Re: [PATCH] docs: .gitignore parsing is to the top of the repo","fromName":"Andrew Berry","fromEmail":"andrew@furrypaws.ca","sentAt":"2021-07-18T14:12:28Z","receivedAt":"2021-07-18T14:12:48Z","isPatch":true,"sender":{"key":"andrew@furrypaws.ca","avatar":"https://avatars.githubusercontent.com/u/255023?v=4"},"body":"On 6 Jul 2021, at 17:57, Junio C Hamano wrote:\n\n> If you do \"toplevel\" -> \"top-level\" while at it, perhaps we would\n> want to correct \"work tree\" -> \"working tree\".\n\nRather than think of this as a one-off fix, I thought to look to see how \nmany instances of each are currently used.\n\ntoplevel: 246\ntop-level: 119\nwork tree: 538\nworking tree: 2610\n\nSince many of these instances are in translated strings, and that the \ntext is understandable with any of the variants, I don't think it's \nworth changing. \"Our standard is no standard\" etc.\n\nThat leaves bringing the note about the work tree earlier in the \nsentence. Here's a hopefully easier to read word-diff. Look good?\n\ndiff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt\nindex 53e7d5c914..b4c8b9c0de 100644\n--- a/Documentation/gitignore.txt\n+++ b/Documentation/gitignore.txt\n@@ -27,12 +27,11 @@ precedence, the last matching pattern decides the \noutcome):\n    them.\n\n  * Patterns read from a `.gitignore` file in the same directory\n    as the path, or in any parent [-directory, with patterns in the-]\n[-   higher level files-]{+directory+} (up to the toplevel of the work\n    [-tree)-]{+tree), with patterns in the higher level files+} being \noverridden by those in\n    lower level files down to the directory containing the file. These \npatterns\n    match relative to the location of the `.gitignore` file.  A project \nnormally\n    includes such `.gitignore` files in its repository, containing \npatterns for\n    files generated as part of the project build.\n\n  * Patterns read from `$GIT_DIR/info/exclude`.\n"},{"id":"430538","messageId":"xmqqy2a2kv5z.fsf@gitster.g","threadId":"56042","inReplyTo":"52880F2B-FAD4-4E36-8662-A798B91B5C94@furrypaws.ca","subject":"Re: [PATCH] docs: .gitignore parsing is to the top of the repo","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-19T18:36:40Z","receivedAt":"2021-07-19T19:15:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Andrew Berry\" <andrew@furrypaws.ca> writes:\n\n> On 6 Jul 2021, at 17:57, Junio C Hamano wrote:\n>\n>> If you do \"toplevel\" -> \"top-level\" while at it, perhaps we would\n>> want to correct \"work tree\" -> \"working tree\".\n>\n> Rather than think of this as a one-off fix, I thought to look to see\n> how many instances of each are currently used.\n>\n> toplevel: 246\n> top-level: 119\n> work tree: 538\n> working tree: 2610\n>\n> Since many of these instances are in translated strings, and that the\n> text is understandable with any of the variants, I don't think it's \n> worth changing. \"Our standard is no standard\" etc.\n\nSo using \"working tree\" and \"toplevel\" might be adjusting to\nmajority, but I agree that there are so numerous that tweaking only\none \"toplevel\" (or another \"work tree\") should not distract the main\npoint of this patch.\n\nThanks for stepping back and thinking it carefully.  I wish\neverybody did more of that ;-)\n\n> That leaves bringing the note about the work tree earlier in the\n> sentence. Here's a hopefully easier to read word-diff. Look good?\n\nSure, but the thing is that the version of the patch (with the\nchange from toplevel to top-level) has already been in 'next' for\nmore than a week.\n\nThanks.\n\n> diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt\n> index 53e7d5c914..b4c8b9c0de 100644\n> --- a/Documentation/gitignore.txt\n> +++ b/Documentation/gitignore.txt\n> @@ -27,12 +27,11 @@ precedence, the last matching pattern decides the\n> outcome):\n>    them.\n>\n>  * Patterns read from a `.gitignore` file in the same directory\n>    as the path, or in any parent [-directory, with patterns in the-]\n> [-   higher level files-]{+directory+} (up to the toplevel of the work\n>    [-tree)-]{+tree), with patterns in the higher level files+} being\n>    overridden by those in\n>    lower level files down to the directory containing the file. These\n>    patterns\n>    match relative to the location of the `.gitignore` file.  A project\n>    normally\n>    includes such `.gitignore` files in its repository, containing\n>    patterns for\n>    files generated as part of the project build.\n>\n>  * Patterns read from `$GIT_DIR/info/exclude`.\n"}]}