From 23105fd1fcaeb90eb31eea53ee1e47ab1e046b53 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Sat, 1 Apr 2023 13:12:32 -0600 Subject: [PATCH] ignore/gitignore: expose `gitconfig_excludes_path` I have reservations about this, but it looks useful and doesn't seem terribly onerous to support. The `ignore` crate will really always need to have some kind of logic supporting this in some form I think. Closes #2482 --- crates/ignore/src/gitignore.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ignore/src/gitignore.rs b/crates/ignore/src/gitignore.rs index b42039332..9aeef66ec 100644 --- a/crates/ignore/src/gitignore.rs +++ b/crates/ignore/src/gitignore.rs @@ -533,7 +533,7 @@ impl GitignoreBuilder { /// Return the file path of the current environment's global gitignore file. /// /// Note that the file path returned may not exist. -fn gitconfig_excludes_path() -> Option { +pub fn gitconfig_excludes_path() -> Option { // git supports $HOME/.gitconfig and $XDG_CONFIG_HOME/git/config. Notably, // both can be active at the same time, where $HOME/.gitconfig takes // precedent. So if $HOME/.gitconfig defines a `core.excludesFile`, then