Repository navigation
Conversation
remote::httpproxy saved and cleared HTTP_PROXY, HTTPS_PROXY and NO_PROXY, but libgit2 reads the lower-case http_proxy, https_proxy and no_proxy first, so a machine with e.g. https_proxy set fails config_overrides, config_overrides_detached_remote and env (see libgit2#6502). repo::env cleared the repository variables, but not GIT_CONFIG_NOSYSTEM, GIT_CONFIG_SYSTEM and GIT_CONFIG_GLOBAL; with GIT_CONFIG_NOSYSTEM=1 set, repo::env::config fails, since the system file it sets is not read.
This branch has not been deployed
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.
Some tests fail when the environment they run in sets proxy or config variables; the suites reset some of these variables, but not all.
Lower-case proxy variables (
remote::httpproxy). Since #6498 the suite saves and clearsHTTP_PROXY,HTTPS_PROXYandNO_PROXY, but libgit2 readshttp_proxy,https_proxyandno_proxyfirst (http_proxy_envinremote.c). Onmain,https_proxyalone failsconfig_overrides,config_overrides_detached_remoteandenv, andno_proxyalone failsenv; these are the failures reported in #6502, whose environment had the lower-case forms set. (curl, for one, acceptshttp_proxyonly in lower case.) The commit saves, clears and restores the lower-case forms as well.System config switches (
repo::env).repo::env::configpointsGIT_CONFIG_SYSTEMto its own file, but withGIT_CONFIG_NOSYSTEM=1that file is never read. The commit clearsGIT_CONFIG_NOSYSTEMinclear_git_env(), andGIT_CONFIG_SYSTEMandGIT_CONFIG_GLOBALwith it: the other tests of the suite open repositories withGIT_REPOSITORY_OPEN_FROM_ENVand so read the user's config files too, andrepo::env::configalready unsets all three at its end.A third variable,
GIT_COMMON_DIR, makesrepo::initfail through a bug ingit_repository_init_ext; that is #7491.To reproduce (on
main, 42a89d7)Testing
With the commit, each of the commands above passes. The offline suite (
-xonline -xstress, Debug build, Linux) passes exceptcore::structinit::compare, which fails on my machine without the commit too.