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
(initial)
find header lines near the end of commit messages
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 3 Feb 2011 18:54:01 +0000
(19:54 +0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 3 Feb 2011 18:55:42 +0000
(19:55 +0100)
git-grep-footer
[new file with mode: 0755]
patch
|
blob
diff --git a/git-grep-footer
b/git-grep-footer
new file mode 100755
(executable)
index 0000000..
026f5bc
--- /dev/null
+++ b/
git-grep-footer
@@ -0,0
+1,11
@@
+#!/bin/sh
+git log --pretty=%b%x00 "$@" |
+perl -n0 -wMstrict -E '
+ for (reverse split /\n\n/) {
+ my @headers = grep m{
+ ^ (?: [a-z]+ (?: (?:-\w+)+ | \ by ) ) : \s* \S
+ }imx, split /\n/ or next;
+ say for @headers;
+ last;
+ }
+'