Toggle diff (40 lines)
diff --git a/guix/git.scm b/guix/git.scm
index 1820036f25..ed00a50df9 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -279,13 +279,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
@@ -293,6 +295,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)))
@@ -391,7 +394,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.