Clone of mesa.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

get-extra-pick-list.sh 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. latest_branchpoint=`git merge-base origin/master HEAD`
  12. # Grep for commits with "cherry picked from commit" in the commit message.
  13. git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
  14. grep "cherry picked from commit" |\
  15. sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
  16. # For each cherry-picked commit...
  17. cat already_picked | cut -c -8 |\
  18. while read sha
  19. do
  20. # ... check if it's referenced (fixed by another) patch
  21. git log -n1 --pretty=oneline --grep=$sha $latest_branchpoint..origin/master |\
  22. cut -c -8 |\
  23. while read candidate
  24. do
  25. # And flag up if it hasn't landed in branch yet.
  26. if grep -q ^$candidate already_picked ; then
  27. continue
  28. fi
  29. # Or if it isn't in the ignore list.
  30. if [ -f bin/.cherry-ignore ] ; then
  31. if grep -q ^$candidate bin/.cherry-ignore ; then
  32. continue
  33. fi
  34. fi
  35. printf "Commit \"%s\" references %s\n" \
  36. "`git log -n1 --pretty=oneline $candidate`" \
  37. "$sha"
  38. done
  39. done
  40. rm -f already_picked