]> git.ipfire.org Git - thirdparty/git.git/commit
ignore: note info/exclude lives in GIT_COMMON_DIR, not GIT_DIR
authorD. Ben Knoble <ben.knoble+github@gmail.com>
Tue, 12 May 2026 21:21:43 +0000 (17:21 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 May 2026 01:25:52 +0000 (10:25 +0900)
commitbd40c65bbc98eb1244d7f91e7265af0aa21e4404
treeaf5acec34bbac8a0eb02e14e57b2e98963fcc9c9
parent94f057755b7941b321fd11fec1b2e3ca5313a4e0
ignore: note info/exclude lives in GIT_COMMON_DIR, not GIT_DIR

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
and some code comments to say so.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-ls-files.adoc
Documentation/git-svn.adoc
Documentation/gitformat-index.adoc
Documentation/gitignore.adoc
dir.c
dir.h