guix: update-cached-checkout: Fix fetching remote for branches, commits and tags.

Follow up of 66463356ce.

Because of the mentioned change, update-cached-checkout doesn't
update the checkout for branches, commits or tags.

This means `guix pull` with %default-channels no longer pulls
newer versions. `forward-update-check` no longer fetches the
commit to check relations for, leading to an error that
reference is not available.

* guix/git.scm (update-cached-checkout): Fetch remote even if symref-list is
empty.

Change-Id: Ia6bb1c669065cf19a6dd16c2a403e8590bc07613
This commit is contained in:
Rutherther 2025-09-23 17:59:02 +02:00 committed by Ian Eure
parent b9e46d0503
commit 7d1d1d1f7c
No known key found for this signature in database
GPG key ID: 8499AC88F1A71CF2

View file

@ -596,7 +596,6 @@ current settings unchanged."
;; When using symrefs, fetch remote again even if it has been cloned just
;; before as the requested reference are not fetched when 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