X-Git-Url: https://git.cameronkatri.com/cgit.git/blobdiff_plain/8729d251a900b2e6e22cc4c93a2193fd8a2b9acf..ad006918a570da32457461a5e59289b611d9a732:/filters/commit-links.sh
diff --git a/filters/commit-links.sh b/filters/commit-links.sh
index d2cd2b3..5881952 100755
--- a/filters/commit-links.sh
+++ b/filters/commit-links.sh
@@ -15,11 +15,14 @@
# CGIT_REPO_CLONE_URL ( = repo.clone-url setting )
#
+regex=''
+
# This expression generates links to commits referenced by their SHA1.
regex=$regex'
-s|\b([0-9a-fA-F]{8,40})\b|\1|g'
+s|\b([0-9a-fA-F]{7,40})\b|\1|g'
+
# This expression generates links to a fictional bugtracker.
regex=$regex'
-s| #([0-9]+)\b|#\1|g'
+s|#([0-9]+)\b|#\1|g'
sed -re "$regex"