get-typod-pick-list.sh: add new script
[mesa.git] / bin / get-typod-pick-list.sh
1 #!/bin/sh
2
3 # Script for generating a list of candidates which have typos in the nomination line
4 #
5 # Usage examples:
6 #
7 # $ bin/get-typod-pick-list.sh
8 # $ bin/get-typod-pick-list.sh > picklist
9 # $ bin/get-typod-pick-list.sh | tee picklist
10
11 # NB:
12 # This script intentionally _never_ checks for specific version tag
13 # Should we consider folding it with the original get-pick-list.sh
14
15 # Grep for commits with "cherry picked from commit" in the commit message.
16 git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
17 grep "cherry picked from commit" |\
18 sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
19
20 # Grep for commits that were marked as a candidate for the stable tree.
21 git log --reverse --pretty=%H -i --grep='^CC:.*mesa-dev' HEAD..origin/master |\
22 while read sha
23 do
24 # Check to see whether the patch is on the ignore list.
25 if [ -f bin/.cherry-ignore ] ; then
26 if grep -q ^$sha bin/.cherry-ignore ; then
27 continue
28 fi
29 fi
30
31 # Check to see if it has already been picked over.
32 if grep -q ^$sha already_picked ; then
33 continue
34 fi
35
36 git log -n1 --pretty=oneline $sha | cat
37 done
38
39 rm -f already_picked