summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-01-19 10:28:20 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-01-24 15:47:31 +0100
commitf92efe2fe8169c37f784af209ea56860a5b9a5cb (patch)
tree913cbdcd4fe2046532fd897fdf1a8711c5f53c0a /src
parent6e9151cfbdd816ce59f6340a0ca5800efabb894f (diff)
downloadjustbuild-f92efe2fe8169c37f784af209ea56860a5b9a5cb.tar.gz
GitRepo: Set libgit2 option for auto-detection of proxy settings in fetching from remote
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/file_system/git_repo.cpp3
1 files changed, 3 insertions, 0 deletions
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;