3 # Script for generating a list of candidates for cherry-picking to a stable branch
5 # Grep for commits with "cherry picked from commit" in the commit message.
6 git log
--reverse --grep="cherry picked from commit" origin
/master..HEAD |\
7 grep "cherry picked from commit" |\
8 sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
10 # Grep for commits that were marked as a candidate for the stable tree.
11 git log
--reverse --pretty=%H
-i --grep='^[[:space:]]*NOTE: This is a candidate' HEAD..origin
/master |\
14 # Check to see whether the patch is on the ignore list.
15 if [ -f bin
/.cherry-ignore
] ; then
16 if grep -q ^
$sha bin
/.cherry-ignore
; then
21 # Check to see if it has already been picked over.
22 if grep -q ^
$sha already_picked
; then
26 git log
-n1 --pretty=oneline
$sha |
cat