summaryrefslogtreecommitdiff
path: root/guix/git.scm
diff options
context:
space:
mode:
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