"Andrew Berry" <andrew@xxxxxxxxxxxx> writes: > On 2 Jul 2021, at 20:06, Junio C Hamano wrote: > >> I would have thought that "up to the toplevel of the work >> tree" would be sufficiently clear where the upward traversal of the >> directories ends, i.e. at the repository boundary. > > Seems reasonable. What if we move that note to come after "any parent > directory"? Meaning something like the following? I do agree that it makes it a lot clearer. Documentation/gitignore.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git c/Documentation/gitignore.txt w/Documentation/gitignore.txt index 53e7d5c914..58c2e41bbe 100644 --- c/Documentation/gitignore.txt +++ w/Documentation/gitignore.txt @@ -27,8 +27,8 @@ precedence, the last matching pattern decides the outcome): them. * Patterns read from a `.gitignore` file in the same directory - as the path, or in any parent directory, with patterns in the - higher level files (up to the toplevel of the work tree) being overridden + as the path, or in any parent directory (up to the toplevel of + the work tree), with patterns in the higher level files being overridden by those in lower level files down to the directory containing the file. These patterns match relative to the location of the `.gitignore` file. A project normally includes such