mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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'.
This commit is contained in:
parent
70c128dc33
commit
efa578ecae
1 changed files with 4 additions and 5 deletions
|
@ -182,11 +182,10 @@ (define obj
|
|||
(('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…
Reference in a new issue