diff options
author | Christian Hesse | 2020-10-20 23:46:09 +0200 |
---|---|---|
committer | Christian Hesse | 2020-10-20 23:57:12 +0200 |
commit | a4de0e810b69710c3b32f6d253d80d16dec09f36 (patch) | |
tree | bae0b334de05e134d06b48aeb888a3bf134a705a /filters | |
parent | 779631c6dc23c15bbbf45a7c7ab9fffb619037b7 (diff) | |
download | cgit-a4de0e810b69710c3b32f6d253d80d16dec09f36.tar.gz cgit-a4de0e810b69710c3b32f6d253d80d16dec09f36.tar.bz2 cgit-a4de0e810b69710c3b32f6d253d80d16dec09f36.zip |
global: replace hard coded hash length
With sha1 we had a guaranteed length of 40 hex chars. This changes now
that we have to support sha256 with 64 hex chars... Support both.
Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'filters')
-rwxr-xr-x | filters/commit-links.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/filters/commit-links.sh b/filters/commit-links.sh index 5881952..796ac30 100755 --- a/filters/commit-links.sh +++ b/filters/commit-links.sh | |||
@@ -19,7 +19,7 @@ regex='' | |||
19 | 19 | ||
20 | # This expression generates links to commits referenced by their SHA1. | 20 | # This expression generates links to commits referenced by their SHA1. |
21 | regex=$regex' | 21 | regex=$regex' |
22 | s|\b([0-9a-fA-F]{7,40})\b|<a href="./?id=\1">\1</a>|g' | 22 | s|\b([0-9a-fA-F]{7,64})\b|<a href="./?id=\1">\1</a>|g' |
23 | 23 | ||
24 | # This expression generates links to a fictional bugtracker. | 24 | # This expression generates links to a fictional bugtracker. |
25 | regex=$regex' | 25 | regex=$regex' |