Repository navigation
Conversation
runGit replaced the subprocess env, so GIT_CONFIG_GLOBAL / GIT_CONFIG_SYSTEM / GIT_CONFIG_NOSYSTEM never reached git and user-config rewrites could not be overridden in tests (#2013). The variables are now passed through when set.
Author
|
Superseded by #2014, which merged the same fix a few hours after this PR was opened: |
Member
|
Hey @peda-cos ! Thank you so much for your PR! Sorry, I was working on that same one right as you submitted your PR. If you're interested, I would love to have you contribute on any of the other issues. Let me know what you think! |
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.
Fixes #2013
baseEnv()droppedGIT_CONFIG_GLOBAL/GIT_CONFIG_SYSTEM/GIT_CONFIG_NOSYSTEMwhen building the minimal env forrunGit, so the standard override variables (e.g.GIT_CONFIG_GLOBAL=/dev/null) never reached git and config rewrite rewrites kept breakingTestRemoteURL.The three variables are now forwarded when set. Reproduce:
HOME=<dir with insteadOf in .gitconfig> GIT_CONFIG_GLOBAL=/dev/null go test ./pkg/foreman/agent/repo -run TestRemoteURL— fails on main, passes with this change.