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