Meta/people: find whom to send/cc whats-cooking to

Junio C Hamano committed Jun 28, 2026 at 09:32 UTC 51445a0c5efe5734fc31f302f066d9797b16b8f3
1 file changed +33 -8
people
+33 -8
@@ -1,12 +1,37 @@
1 #!/bin/sh
2 -# Feed whats-cooking to find who are involved
2 +# Feed whats-cooking or revision range to find who are involved
3
4 -sed -ne 's|\(.* \)*\* \([a-z][a-z]/[a-z0-9][-_a-z0-9]*\) ([-0-9]*) [0-9]* commit.*|\2|p' |
5 -while read topic
6 -do
7 - git log --format="%an <%ae>" --no-merges "$topic" ^master
8 -done |
9 -sort -u |
10 -sed -e '/Junio C Hamano/d' -e 's/.*/ &,/' -e '$s/,$//'
4 +usage () {
5 + echo >&2 "usage: $0 <whats-cooking.txt"
6 + echo >&2 " or: $0 whats-cooking.txt"
7 + echo >&2 " or: $0 master..seen"
8 + exit 1
9 +}
10
11 +mode=
12 +if test $# = 0
13 +then
14 + mode=stdin
15 +elif test -r "$1"
16 +then
17 + mode=file
18 +else
19 + mode=revs
20 +fi
21
22 +if test "$mode" = revs
23 +then
24 + git shortlog -e -s --no-merges ^master "$@"
25 +else
26 + if test "$mode" = stdin
27 + then
28 + echo >&2 "reading what's cooking report from stdin..."
29 + cat
30 + else
31 + cat "$1"
32 + fi |
33 + sed -ne 's|\(.* \)*\* \([a-z][a-z]/[^ ]*\) ([-0-9]*) [0-9]* commit.*|\2|p' |
34 + xargs git shortlog -e -s --no-merges ^master
35 +fi |
36 +sed -e 's/^[ 0-9]*[ ]*//' -e 's/$/,/' -e '$s/,$//' |
37 +sort -u