mesa: optimize 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 # Grep for commits that were marked as a candidate for the stable tree.
6 git log --reverse --pretty=%H -i --grep='^[[:space:]]*NOTE: This is a candidate' HEAD..origin/master |\
7 while read sha
8 do
9 # Check to see whether the patch is on the ignore list.
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 done