]> git.cameronkatri.com Git - cgit.git/blobdiff - filters/commit-links.sh
git: update to v2.32.0
[cgit.git] / filters / commit-links.sh
index d2cd2b33f3ff698ee80ccb1656272340d2d36ff3..796ac308d237b41d1eeb01e6cb3072180c6898a1 100755 (executable)
 # 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|<a href="./?id=\1">\1</a>|g'
+s|\b([0-9a-fA-F]{7,64})\b|<a href="./?id=\1">\1</a>|g'
+
 # This expression generates links to a fictional bugtracker.
 regex=$regex'
-s| #([0-9]+)\b|<a href="http://bugs.example.com/?bug=\1">#\1</a>|g'
+s|#([0-9]+)\b|<a href="http://bugs.example.com/?bug=\1">#\1</a>|g'
 
 sed -re "$regex"