From 26965563ef581553c9dd37192293a75de84176bd Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 14 Oct 2022 23:50:49 +0200 Subject: 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(-) (limited to 'guix/git.scm') 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 @@ (define (resolve-reference repository ref) #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 -- cgit v1.2.3