diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-04-14 22:50:02 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-04-14 22:51:38 +0200 |
commit | fab8ab7617d4ba2eed4546e81b004ade5b739691 (patch) | |
tree | 1110e50701a09924f6774900ff85d4b716444d76 /guix | |
parent | 70c2897ea39b8633f7b71324025954e43b4ed055 (diff) |
git: Honor proxy settings when fetching submodules.
Fixes <https://bugs.gnu.org/44593>.
* guix/git.scm (update-submodules): Add #:fetch-options and honor it.
(update-cached-checkout): Pass #:fetch-options to 'update-submodules'.
* doc/guix.texi (Requirements): Adjust comment about Guile-Git.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/git.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/guix/git.scm b/guix/git.scm index 776b03f33a..57fa2ca1ee 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -283,13 +283,15 @@ dynamic extent of EXP." (report-git-error err)))) (define* (update-submodules repository - #:key (log-port (current-error-port))) + #:key (log-port (current-error-port)) + (fetch-options #f)) "Update the submodules of REPOSITORY, a Git repository object." (for-each (lambda (name) (let ((submodule (submodule-lookup repository name))) (format log-port (G_ "updating submodule '~a'...~%") name) - (submodule-update submodule) + (submodule-update submodule + #:fetch-options fetch-options) ;; Recurse in SUBMODULE. (let ((directory (string-append @@ -297,6 +299,7 @@ dynamic extent of EXP." "/" (submodule-path submodule)))) (with-repository directory repository (update-submodules repository + #:fetch-options fetch-options #:log-port log-port))))) (repository-submodules repository))) @@ -397,7 +400,8 @@ it unchanged." (remote-fetch (remote-lookup repository "origin") #:fetch-options (make-default-fetch-options))) (when recursive? - (update-submodules repository #:log-port log-port)) + (update-submodules repository #:log-port log-port + #:fetch-options (make-default-fetch-options))) ;; Note: call 'commit-relation' from here because it's more efficient ;; than letting users re-open the checkout later on. |