aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-06-08 03:38:50 -0400
committerB. Watson <urchlay@slackware.uk>2026-06-08 03:38:50 -0400
commitca4c5eb1e1cf330aaf79f5973cb6a65dd225d63d (patch)
tree33a47c7da84616d6ad1cb7bc414dffb14deaf3a4
parenta2261494bcf759e102c67b6d240c0350b784b24b (diff)
downloadsbo-maintainer-tools-ca4c5eb1e1cf330aaf79f5973cb6a65dd225d63d.tar.gz
Better detection of git hashes.
-rwxr-xr-xsbolint6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbolint b/sbolint
index 2b9b537..0307433 100755
--- a/sbolint
+++ b/sbolint
@@ -1336,8 +1336,10 @@ sub check_github_url {
$dir = $tag;
} elsif(@parts == 1) {
$tag = $dir = $parts[0];
- if($tag =~ /^[0-9a-f]{7,}$/ && $tag !~ /^20\d{6,}/) {
- # commit hash. the /^20\d{6,}/ is to exclude ISO dates like 20240402
+ if($tag =~ /^[0-9a-f]{6,}$/ && $tag !~ /^\d{4,8}$/) {
+ # commit hash. normally these are 7 hex digits, but a few
+ # builds have a 6-digit one. The 2nd regex is to eliminate
+ # dates used as tags.
if(length($tag) < 40) {
# shortened, maybe the full hash is in the filename?
if($filename =~ /([0-9a-f]{40})\./) {