git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] ignore: note info/exclude lives in GIT_COMMON_DIR, not GIT_DIR

From
D. Ben Knoble <ben.knoble+github@gmail.com>
Date
May 11, 2026, 19:55 UTC
Message-ID
<CALnO6CDeejkgXwDJwq2tmeUORf9DTP6kLEmsCoK4X_jcRMCEpw@mail.gmail.com>
In-Reply-To
<fd05eba1-d821-4cbe-ada6-ccab97308e56@gmail.com>
On Mon, May 11, 2026 at 6:30 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 35 quoted lines
>
> 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.

Previous: Phillip WoodNext: D. Ben Knoble
Message 8 of 10 in “dir: use per-worktree repository ignore patterns upon request”
  1. dir: use per-worktree repository ignore patterns upon requestD. Ben Knoble, Apr 24, 2026
  2. brian m. carlsonApr 24, 2026
  3. Phillip WoodApr 24, 2026
  4. Junio C HamanoApr 25, 2026
  5. ignore: note info/exclude lives in GIT_COMMON_DIR, not GIT_DIRD. Ben Knoble, May 8, 2026
  6. brian m. carlsonMay 9, 2026
  7. Phillip WoodMay 11, 2026
  8. D. Ben KnobleMay 11, 2026
  9. ignore: note info/exclude lives in GIT_COMMON_DIR, not GIT_DIRD. Ben Knoble, May 12, 2026
  10. Phillip WoodMay 13, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.