Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / bin / get-extra-pick-list.sh
1 #!/bin/sh
2
3 # Script for generating a list of candidates which fix commits that have been
4 # previously cherry-picked to a stable branch.
5 #
6 # Usage examples:
7 #
8 # $ bin/get-extra-pick-list.sh
9 # $ bin/get-extra-pick-list.sh > picklist
10 # $ bin/get-extra-pick-list.sh | tee picklist
11
12 # Use the last branchpoint as our limit for the search
13 latest_branchpoint=`git merge-base origin/master HEAD`
14
15 # Grep for commits with "cherry picked from commit" in the commit message.
16 git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
17 grep "cherry picked from commit" |\
18 sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
19
20 # For each cherry-picked commit...
21 cat already_picked | cut -c -8 |\
22 while read sha
23 do
24 # ... check if it's referenced (fixed by another) patch
25 git log -n1 --pretty=oneline --grep=$sha $latest_branchpoint..origin/master |\
26 cut -c -8 |\
27 while read candidate
28 do
29 # And flag up if it hasn't landed in branch yet.
30 if grep -q ^$candidate already_picked ; then
31 continue
32 fi
33 # Or if it isn't in the ignore list.
34 if [ -f bin/.cherry-ignore ] ; then
35 if grep -q ^$candidate bin/.cherry-ignore ; then
36 continue
37 fi
38 fi
39 printf "Commit \"%s\" references %s\n" \
40 "`git log -n1 --pretty=oneline $candidate`" \
41 "$sha"
42 done
43 done
44
45 rm -f already_picked