guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: guix-commits
Subject: 01/03: git: Don't try to resolve tags with 'tag-lookup'.
Date: Thu, 2 Apr 2020 17:16:53 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit efa578ecaece67366b4b0e2266de7c2faaa4ae54
Author: Ludovic Courtès <address@hidden>
AuthorDate: Thu Apr 2 21:33:48 2020 +0200

    git: Don't try to resolve tags with 'tag-lookup'.
    
    Fixes <https://bugs.gnu.org/40377>.
    Reported by Brice Waegeneire <address@hidden>.
    
    * guix/git.scm (switch-to-ref): In the 'tag case, remove call to
    'tag-lookup'.
---
 guix/git.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/guix/git.scm b/guix/git.scm
index b1ce3ea..5fffd42 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]