summaryrefslogtreecommitdiff
path: root/guix/git.scm
diff options
context:
space:
mode:
authorJakub Kądziołka <kuba@kadziolka.net>2020-04-29 11:08:42 +0200
committerJakub Kądziołka <kuba@kadziolka.net>2020-04-29 11:08:42 +0200
commit4035c3e3525599c3aa958d498c5bc789a4adffc3 (patch)
treee55a02215fcdb635d0504fc129526bfbf66abd14 /guix/git.scm
parent492b82bd4d592276e65c4b9bfbe1b679a00ff09f (diff)
parent4f0f46e4af0e342d84c5ad448258702029601e4b (diff)
Merge branch 'master' into staging
Diffstat (limited to 'guix/git.scm')
-rw-r--r--guix/git.scm9
1 files changed, 4 insertions, 5 deletions
diff --git a/guix/git.scm b/guix/git.scm
index b1ce3ea451..5fffd429bd 100644
--- a/guix/git.scm
+++ b/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))