From f92efe2fe8169c37f784af209ea56860a5b9a5cb Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 19 Jan 2023 10:28:20 +0100 Subject: GitRepo: Set libgit2 option for auto-detection of proxy settings in fetching from remote --- src/buildtool/file_system/git_repo.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/buildtool/file_system/git_repo.cpp') diff --git a/src/buildtool/file_system/git_repo.cpp b/src/buildtool/file_system/git_repo.cpp index a3d7e388..713c73b9 100644 --- a/src/buildtool/file_system/git_repo.cpp +++ b/src/buildtool/file_system/git_repo.cpp @@ -878,6 +878,9 @@ auto GitRepo::FetchFromRemote(std::string const& repo_url, git_fetch_options fetch_opts{}; git_fetch_options_init(&fetch_opts, GIT_FETCH_OPTIONS_VERSION); + // set the option to auto-detect proxy settings + fetch_opts.proxy_opts.type = GIT_PROXY_AUTO; + // disable update of the FETCH_HEAD pointer fetch_opts.update_fetchhead = 0; -- cgit v1.2.3