mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 12:05:19 -06:00
git: Guard against git submodules lacking a path.
* guix/git.scm (update-submodules) <directory>: Remove extraneous "/" in file name. Only recurse when the directory exists. Fixes: #5579 Change-Id: Ica5e5de196bd1a3d5a0a41c34162c68c0855298d
This commit is contained in:
parent
7d326824a1
commit
725a138db8
1 changed files with 11 additions and 5 deletions
16
guix/git.scm
16
guix/git.scm
|
|
@ -402,11 +402,17 @@ values) if DIRECTORY does not hold a readable Git repository."
|
|||
;; Recurse in SUBMODULE.
|
||||
(let ((directory (string-append
|
||||
(repository-working-directory repository)
|
||||
"/" (submodule-path submodule))))
|
||||
(with-repository directory repository
|
||||
(update-submodules repository
|
||||
#:fetch-options fetch-options
|
||||
#:log-port log-port)))))
|
||||
(submodule-path submodule))))
|
||||
;; libgit2, unlike git, does not discard invalid submodules
|
||||
;; that lack a path, and instead uses the module name as the
|
||||
;; path in this case, which would break `with-repository`
|
||||
;; below (see:
|
||||
;; <https://github.com/libgit2/libgit2/issues/7194>).
|
||||
(when (file-exists? directory)
|
||||
(with-repository directory repository
|
||||
(update-submodules repository
|
||||
#:fetch-options fetch-options
|
||||
#:log-port log-port))))))
|
||||
(repository-submodules repository)))
|
||||
|
||||
(define-syntax-rule (false-if-git-not-found exp)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue