summaryrefslogtreecommitdiff
path: root/people
blob: 9f0026ecb0324f4d2838cb37e3d28662556c57c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# Feed whats-cooking or revision range to find who are involved

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/$/,/' |
sort -u |
sed -e '$s/,$//' -e 's/^\([^<]*\.[^<]*[^ ]\) </"\1" </' -e 's/^/  /'