gitignore.txt: clarify default core.excludesfile path
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.
--- Documentation/gitignore.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/gitignore.txt +1 -1
@@ -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 -----------
Signature · 1 line
2.18.0
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.
---
I noticed the typo in core.excludesfile and $XDG_CONFIG_HOME while I was verifing the previous change to clarify the documentation matched the code. Fixing these minor issues in the comments will hopefully make it easier for others to find the right places in the code in the future.
dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
dir.c +1 -1
@@ -2497,7 +2497,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 ))
Signature · 1 line
2.18.0
Quoted 2 lines · Todd Zullinger
The default core.excludesfile path is $XDG_CONFIG_HOME/git/ignore. $HOME/.config/git/ignore is used if
XDG_CONFIG_HOMEis empty or unset,
... because $HOME/.config is the default value for XDG_CONFIG_HOME when it is unset, that is? If so, the change makes sense.
Quoted 22 lines
as described later in the document.
Signed-off-by Todd Zullinger <[email protected]>--- Documentation/gitignore.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/gitignore.txt +1
-1@@ -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 -----------
Quoted 7 lines · Junio C Hamano
Quoted 2 lines · Todd Zullinger
The default core.excludesfile path is $XDG_CONFIG_HOME/git/ignore. $HOME/.config/git/ignore is used if
XDG_CONFIG_HOMEis empty or unset,... because $HOME/.config is the default value for
XDG_CONFIG_HOMEwhen it is unset, that is? If so, the change makes sense.
Indeed, that's the fallback path.
Thanks,
Signature · 1 line
Todd