Browse Source

git: Don't try to resolve tags with 'tag-lookup'.

Fixes <https://bugs.gnu.org/40377>.
Reported by Brice Waegeneire <brice@waegenei.re>.

* guix/git.scm (switch-to-ref): In the 'tag case, remove call to
'tag-lookup'.
gn-latest-20200428
Ludovic Courtès 2 years ago
parent
commit
efa578ecae
No known key found for this signature in database GPG Key ID: 90B11993D9AEBB5
  1. 9
      guix/git.scm

9
guix/git.scm

@ -182,11 +182,10 @@ OID (roughly the commit hash) corresponding to REF."
(('tag . tag)
(let ((oid (reference-name->oid repository
(string-append "refs/tags/" tag))))
;; Get the commit that the tag at OID refers to. This is not
;; strictly needed, but it's more consistent to always return the
;; OID of a commit.
(object-lookup repository
(tag-target-id (tag-lookup repository oid))))))))
;; OID may point to a "tag" object, but it can also point directly
;; to a "commit" object, as surprising as it may seem. Return that
;; object, whatever that is.
(object-lookup repository oid))))))
(reset repository obj RESET_HARD)
(object-id obj))

Loading…
Cancel
Save