mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +01:00
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.
This commit is contained in:
parent
70c2897ea3
commit
fab8ab7617
2 changed files with 9 additions and 4 deletions
|
@ -848,7 +848,8 @@ version 0.1.0 or later;
|
|||
@item @uref{https://notabug.org/guile-lzlib/guile-lzlib, Guile-lzlib};
|
||||
@item @uref{https://www.nongnu.org/guile-avahi/, Guile-Avahi};
|
||||
@item
|
||||
@c FIXME: Specify a version number once a release has been made.
|
||||
@c FIXME: We need the #:fetch-options parameter of 'submodule-update',
|
||||
@c which appeared in 0.5.0. Change below after string freeze.
|
||||
@uref{https://gitlab.com/guile-git/guile-git, Guile-Git}, version 0.3.0
|
||||
or later;
|
||||
@item @uref{https://savannah.nongnu.org/projects/guile-json/, Guile-JSON}
|
||||
|
|
10
guix/git.scm
10
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.
|
||||
|
|
Loading…
Reference in a new issue