git: 'update-cached-checkout' returns the commit ID when given a tag.
authorLudovic Courtès <ludo@gnu.org>
Tue, 11 Oct 2022 09:16:23 +0000 (11:16 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 17 Oct 2022 07:37:27 +0000 (09:37 +0200)
commit46f7011591601b4783b2dc2c7252c41564ca0140
tree220511d64fdf990f0c770aea605e8490655f2ae8
parenteec920ba93ecb086366576e31b785962fbaf81c2
git: 'update-cached-checkout' returns the commit ID when given a tag.

Previously, starting with commit
efa578ecaece67366b4b0e2266de7c2faaa4ae54, 'update-cached-checkout' would
return the OID of the annotated tag the tag points to.  With this change
it returns the OID of the commit object in all cases.

* guix/git.scm (resolve-reference): In the 'tag' case, call
'tag-target-id' and 'tag-lookup' when OID designates an annotated tag.
* tests/git.scm ("update-cached-checkout, tag"): New test.
guix/git.scm
tests/git.scm