mesa: simplify get-pick-list.sh script
[mesa.git] / bin / get-pick-list.sh
1 #!/bin/sh
2
3 # Script for generating a list of candidates for cherry-picking to a stable branch
4
5 git log --reverse --pretty=%H HEAD..origin/master |\
6 while read sha
7 do
8 # Check to see whether the patch was marked as a candidate for the stable tree.
9 if git log -n1 $sha | grep -iq '^[[:space:]]*NOTE: This is a candidate' ; then
10 if [ -f .git/cherry-ignore ] ; then
11 if grep -q ^$sha .git/cherry-ignore ; then
12 continue
13 fi
14 fi
15
16 # Check to see if it has already been picked over.
17 if git log origin/master..HEAD | grep -q "cherry picked from commit $sha"; then
18 continue
19 fi
20
21 git log -n1 --pretty=oneline $sha | cat
22 fi
23 done