Skip to content

Commit

Permalink
ignore/gitignore: expose gitconfig_excludes_path
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Eric-Arellano authored and BurntSushi committed Jul 7, 2023
1 parent ad79d12 commit 23105fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ignore/src/gitignore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf> {
pub fn gitconfig_excludes_path() -> Option<PathBuf> {
// 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
Expand Down

0 comments on commit 23105fd

Please sign in to comment.