guix-commits
[Top][All Lists]
Advanced

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

01/04: git: 'update-cached-checkout' recognizes truncated commit IDs.


From: guix-commits
Subject: 01/04: git: 'update-cached-checkout' recognizes truncated commit IDs.
Date: Fri, 14 Oct 2022 18:45:10 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 26965563ef581553c9dd37192293a75de84176bd
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Oct 14 23:50:49 2022 +0200

    git: 'update-cached-checkout' recognizes truncated commit IDs.
    
    Fixes a regression introduced in
    602527ab9778165ca9a8f9cb62036038b5354688 that broke
    'tests/guix-build-branch.sh'.
    
    * guix/git.scm (resolve-reference): Revert change from
    602527ab9778165ca9a8f9cb62036038b5354688.
---
 guix/git.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/guix/git.scm b/guix/git.scm
index d7fd320f50..10e6dcaf23 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -261,7 +261,8 @@ corresponding Git object."
                           #f))
                      (_ #f)))
               => (lambda (commit) (resolve `(commit . ,commit))))
-             ((not (commit-id? str))
+             ((or (> (string-length str) 40)
+                  (not (string-every char-set:hex-digit str)))
               (resolve `(tag . ,str)))      ;definitely a tag
              (else
               (catch 'git-error



reply via email to

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