Clone of mesa.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

get-extra-pick-list.sh 1.2KB

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