about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xfilters/commit-links.sh7
1 files changed, 5 insertions, 2 deletions
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 @@
15# CGIT_REPO_CLONE_URL ( = repo.clone-url setting ) 15# CGIT_REPO_CLONE_URL ( = repo.clone-url setting )
16# 16#
17 17
18regex=''
19
18# This expression generates links to commits referenced by their SHA1. 20# This expression generates links to commits referenced by their SHA1.
19regex=$regex' 21regex=$regex'
20s|\b([0-9a-fA-F]{8,40})\b|<a href="./?id=\1">\1</a>|g' 22s|\b([0-9a-fA-F]{7,40})\b|<a href="./?id=\1">\1</a>|g'
23
21# This expression generates links to a fictional bugtracker. 24# This expression generates links to a fictional bugtracker.
22regex=$regex' 25regex=$regex'
23s| #([0-9]+)\b|<a href="http://bugs.example.com/?bug=\1">#\1</a>|g' 26s|#([0-9]+)\b|<a href="http://bugs.example.com/?bug=\1">#\1</a>|g'
24 27
25sed -re "$regex" 28sed -re "$regex"