From d65a750ab292d2c34da412720ae675d0abb2d1ac Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 4 Feb 2011 04:34:35 +0100 Subject: [PATCH] additional hash simplifications for -s'any' --- git-grep-footer | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git-grep-footer b/git-grep-footer index 8ac3a03..53f6f1c 100755 --- 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']) { -- 2.30.0