Support GIT_CONFIG_GLOBAL for finding core.excludesFile#3394
Open
mitre88 wants to merge 2 commits intoBurntSushi:masterfrom
Open
Support GIT_CONFIG_GLOBAL for finding core.excludesFile#3394mitre88 wants to merge 2 commits intoBurntSushi:masterfrom
mitre88 wants to merge 2 commits intoBurntSushi:masterfrom
Conversation
added 2 commits
May 5, 2026 16:57
When decompressing files with names starting with a dash (e.g., '-10.txt.gz'), the filename was being passed as an argument without the '--' separator. This caused gzip to interpret the filename as a string of options. For example, 'gzip -d -c -10.txt.gz' would fail because gzip treats '-10.txt.gz' as invalid options rather than a filename. The fix adds '--' before the filename argument to ensure the compression tool knows that all following arguments are filenames, not options. Fixes issue BurntSushi#3222
Git 2.32 introduced GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM environment variables for overriding git config file locations. The ignore crate's gitconfig_excludes_path() only checked hardcoded paths but did not check GIT_CONFIG_GLOBAL, causing users with non-standard gitconfig locations to have their global gitignore silently ignored. Added check for GIT_CONFIG_GLOBAL at the start of gitconfig_excludes_path() to respect the environment variable, matching git's behavior. Fixes issue BurntSushi#3275
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support GIT_CONFIG_GLOBAL environment variable for finding core.excludesFile
Git 2.32 introduced GIT_CONFIG_GLOBAL for overriding git config file locations.
The ignore crate did not check this env var, causing global gitignore to be silently ignored.
Added check for GIT_CONFIG_GLOBAL at start of gitconfig_excludes_path() to match git behavior.
Fixes issue #3275