* [PATCH v2 1/1] commit-links.sh: improve regular expressions
@ 2011-06-06 18:34 mailings
0 siblings, 0 replies; only message in thread
From: mailings @ 2011-06-06 18:34 UTC (permalink / raw)
From: Ferry Huberts <ferry.huberts at pelagic.nl>
Signed-off-by: Ferry Huberts <ferry.huberts at pelagic.nl>
---
filters/commit-links.sh | 7 +++++--
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 @@
# 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,40})\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"
--
1.7.5.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-06 18:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-06 18:34 [PATCH v2 1/1] commit-links.sh: improve regular expressions mailings
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).