git.shiar.nl
/
git-grep-footer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd2d128
)
additional hash simplifications for -s'any'
author
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 4 Feb 2011 03:34:35 +0000
(
04:34
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 4 Feb 2011 03:35:22 +0000
(
04:35
+0100)
git-grep-footer
patch
|
blob
|
history
diff --git
a/git-grep-footer
b/git-grep-footer
index 8ac3a03b0a9fcf1225b5e33c4f564f1439ec266d..53f6f1cf49d15e0d6f63d062c91e844c7bb24c6d 100755
(executable)
--- a/
git-grep-footer
+++ b/
git-grep-footer
@@
-79,7
+79,8
@@
while (readline) {
s{\b (https?)://\S+ }{[$1]}gmsx; # url
s{(?: < | \A ) [^@>\s]+ @ [^>]+ (?: > | \Z )}{<...>}igmsx; # address
s{\b [0-9]+ \b}{[num]}gmsx; # number
- s{\b I? [0-9a-f]{40} \b}{[sha1]}gmsx; # hash
+ s{\b [Ig]? [0-9a-f]{ 40} \b}{[sha1]}gmsx; # hash
+ s{\b [Ig]? [0-9a-f]{6,40} \b}{[hash]}gmsx; # abbrev
}
}
when (['all', 'contents']) {