3 # Script for generating a list of candidates which fix commits that have been
4 # previously cherry-picked to a stable branch.
8 # $ bin/get-extra-pick-list.sh
9 # $ bin/get-extra-pick-list.sh > picklist
10 # $ bin/get-extra-pick-list.sh | tee picklist
12 # Use the last branchpoint as our limit for the search
13 # XXX: there should be a better way for this
14 latest_branchpoint
=`git branch | grep \* | cut -c 3-`-branchpoint
16 # Grep for commits with "cherry picked from commit" in the commit message.
17 git log
--reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
18 grep "cherry picked from commit" |\
19 sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' |\
23 # Check if the original commit is referenced in master
24 git log
-n1 --pretty=oneline
--grep=$sha $latest_branchpoint..origin
/master |\
28 # Check if the potential fix, hasn't landed in branch yet.
29 found
=`git log -n1 --pretty=oneline --reverse --grep=$candidate $latest_branchpoint..HEAD |wc -l`
32 echo Commit
$candidate might need to be picked
, as it references
$sha