Ian Romanick | 2d95db6 | 2012-10-19 22:30:53 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
Andreas Boll | fa27a0d | 2012-10-19 22:54:56 +0200 | [diff] [blame] | 3 | # Script for generating a list of candidates for cherry-picking to a stable branch |
| 4 | |
Andreas Boll | b299152 | 2012-10-19 23:00:17 +0200 | [diff] [blame^] | 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 |\ |
Ian Romanick | 2d95db6 | 2012-10-19 22:30:53 +0200 | [diff] [blame] | 7 | while read sha |
| 8 | do |
Andreas Boll | b299152 | 2012-10-19 23:00:17 +0200 | [diff] [blame^] | 9 | # Check to see whether the patch is on the ignore list. |
Ian Romanick | 2d95db6 | 2012-10-19 22:30:53 +0200 | [diff] [blame] | 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 |
Ian Romanick | 2d95db6 | 2012-10-19 22:30:53 +0200 | [diff] [blame] | 22 | done |