mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
guix: git: Create/update remote references locally when needed.
* guix/git.scm (update-cached-checkout): Create/update remote references locally. Change-Id: Ice761d09eebc4f1275381a4eefbdd679d9b95127
This commit is contained in:
parent
56cee947fa
commit
7ea084410c
1 changed files with 8 additions and 4 deletions
12
guix/git.scm
12
guix/git.scm
|
|
@ -593,16 +593,20 @@ current settings unchanged."
|
|||
;; left unchanged when cloning and pulling.
|
||||
(set-config-string config "core.autocrlf" "input")
|
||||
|
||||
;; Only fetch remote if it has not been cloned just before.
|
||||
;; When using references, fetch remote again when it has just been cloned
|
||||
;; just before as the requested reference are not fetched xhen cloning.
|
||||
(when (and cache-exists?
|
||||
(not (null? symref-list))
|
||||
(not (reference-available? repository ref)))
|
||||
(remote-fetch (remote-lookup repository "origin")
|
||||
#:fetch-options (make-default-fetch-options
|
||||
#:verify-certificate?
|
||||
verify-certificate?)
|
||||
;; Symbolic references are not fetched from the remote by
|
||||
;; default.
|
||||
#:refspecs symref-list))
|
||||
;; Build refspecs from symbolic references so they are
|
||||
;; created locally and updated if necessary.
|
||||
#:refspecs (map (lambda (ref)
|
||||
(string-append "+" ref ":" ref))
|
||||
symref-list)))
|
||||
(when recursive?
|
||||
(update-submodules repository #:log-port log-port
|
||||
#:fetch-options
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue