From 45e851cb4443188db537d9e1c407ab4193ac58ed Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Wed, 27 Jun 2018 00:46:51 -0400 Subject: [PATCH 1/2] gitignore.txt: clarify default core.excludesfile path The default core.excludesfile path is $XDG_CONFIG_HOME/git/ignore. $HOME/.config/git/ignore is used if XDG_CONFIG_HOME is empty or unset, as described later in the document. Signed-off-by: Todd Zullinger Signed-off-by: Junio C Hamano --- Documentation/gitignore.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt index ff5d7f9ed6..d107daaffd 100644 --- a/Documentation/gitignore.txt +++ b/Documentation/gitignore.txt @@ -7,7 +7,7 @@ gitignore - Specifies intentionally untracked files to ignore SYNOPSIS -------- -$HOME/.config/git/ignore, $GIT_DIR/info/exclude, .gitignore +$XDG_CONFIG_HOME/git/ignore, $GIT_DIR/info/exclude, .gitignore DESCRIPTION ----------- From 51d1863168ddae9010a3fcadca8f2502389fdbc2 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Wed, 27 Jun 2018 00:46:52 -0400 Subject: [PATCH 2/2] dir.c: fix typos in core.excludesfile comment Make it easier to find references to core.excludesfile and the default $XDG_CONFIG_HOME/git/ignore path. Signed-off-by: Todd Zullinger Signed-off-by: Junio C Hamano --- dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dir.c b/dir.c index 7c4b45e30e..3f46acf5e5 100644 --- a/dir.c +++ b/dir.c @@ -2475,7 +2475,7 @@ void setup_standard_excludes(struct dir_struct *dir) { dir->exclude_per_dir = ".gitignore"; - /* core.excludefile defaulting to $XDG_HOME/git/ignore */ + /* core.excludesfile defaulting to $XDG_CONFIG_HOME/git/ignore */ if (!excludes_file) excludes_file = xdg_config_home("ignore"); if (excludes_file && !access_or_warn(excludes_file, R_OK, 0))