aboutsummaryrefslogtreecommitdiff
path: root/guix/git.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-10-14 23:50:49 +0200
committerLudovic Courtès <ludo@gnu.org>2022-10-15 00:44:09 +0200
commit26965563ef581553c9dd37192293a75de84176bd (patch)
tree978eee684270b05f6b2c42d121548a3738b2d87b /guix/git.scm
parenta11522a02482067cbfbbd9cb881814ffca4854e8 (diff)
downloadguix-26965563ef581553c9dd37192293a75de84176bd.tar
guix-26965563ef581553c9dd37192293a75de84176bd.tar.gz
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.
Diffstat (limited to 'guix/git.scm')
-rw-r--r--guix/git.scm3
1 files changed, 2 insertions, 1 deletions
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