]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/people: find whom to send/cc whats-cooking to
authorJunio C Hamano <gitster@pobox.com>
Sun, 28 Jun 2026 16:32:51 +0000 (09:32 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 28 Jun 2026 16:32:51 +0000 (09:32 -0700)
people

diff --git a/people b/people
index 2aeef340d3259832773a56ebd3cd25f2ed879884..c87829621020c956b31ca916319b1664606922d8 100755 (executable)
--- a/people
+++ b/people
@@ -1,12 +1,37 @@
 #!/bin/sh
-# Feed whats-cooking to find who are involved
+# Feed whats-cooking or revision range to find who are involved
 
-sed -ne 's|\(.* \)*\* \([a-z][a-z]/[a-z0-9][-_a-z0-9]*\) ([-0-9]*) [0-9]* commit.*|\2|p' |
-while read topic
-do
-       git log --format="%an <%ae>" --no-merges "$topic" ^master
-done |
-sort -u |
-sed -e '/Junio C Hamano/d' -e 's/.*/    &,/' -e '$s/,$//'
+usage () {
+       echo >&2 "usage: $0 <whats-cooking.txt"
+       echo >&2 "   or: $0 whats-cooking.txt"
+       echo >&2 "   or: $0 master..seen"
+       exit 1
+}
 
+mode=
+if test $# = 0
+then
+       mode=stdin
+elif test -r "$1"
+then
+       mode=file
+else
+       mode=revs
+fi
 
+if test "$mode" = revs
+then
+       git shortlog -e -s --no-merges ^master "$@"
+else
+       if test "$mode" = stdin
+       then
+               echo >&2 "reading what's cooking report from stdin..."
+               cat
+       else
+               cat "$1"
+       fi  |
+       sed -ne 's|\(.* \)*\* \([a-z][a-z]/[^ ]*\) ([-0-9]*) [0-9]* commit.*|\2|p' |
+       xargs git shortlog -e -s --no-merges ^master
+fi |
+sed -e 's/^[ 0-9]*[    ]*//' -e 's/$/,/' -e '$s/,$//' |
+sort -u