From: D. Ben Knoble Date: Mon, 11 May 2026 19:55:00 GMT Subject: Re: [PATCH v2] ignore: note info/exclude lives in GIT_COMMON_DIR, not GIT_DIR Message-ID: In-Reply-To: On Mon, May 11, 2026 at 6:30 AM Phillip Wood wrote: > > On 08/05/2026 15:14, D. Ben Knoble wrote: > > gitignore(5) says that the per-repository ignore file is > > $GIT_DIR/info/exclude, but in a worktree that is not the case: > > > > git rev-parse --git-path info/exclude > > /path/to/main/worktree/.git/info/exclude > > git rev-parse --git-common-dir > > /path/to/main/worktree/.git > > > > We actually use $GIT_COMMON_DIR/info/exclude. Adjust the documentation > > to say so. > > Thanks for making the documentation match reality. Are there some more > instances than need to be changed? If I run > > git grep -n GIT_DIR/info origin/master Documentation/gitignore.adoc > > I see > > origin/master:Documentation/gitignore.adoc:10:$XDG_CONFIG_HOME/git/ignore, $GIT_DIR/info/exclude, .gitignore > origin/master:Documentation/gitignore.adoc:37: * Patterns read from `$GIT_DIR/info/exclude`. > origin/master:Documentation/gitignore.adoc:53: the `$GIT_DIR/info/exclude` file. > origin/master:Documentation/gitignore.adoc:100: such as $GIT_DIR/info/exclude and core.excludesFile, are treated as if > origin/master:Documentation/gitignore.adoc:149:`$GIT_DIR/info/exclude`. Patterns in the exclude file are used in addition to > origin/master:Documentation/gitignore.adoc:150:those in `$GIT_DIR/info/exclude`. > > We also have a ton of other files under Documentation that mention > $GIT_DIR/info/... all of which, apart from the release notes, I > think should probably be using $GIT_COMMON_DIR but we can always do > that separately > > Thanks > > Phillip Good catch, thanks. Let me adjust the ignore-related ones and leave the rest for now.