Created
October 21, 2014 08:38
-
-
Save jeenuv/778283cdd0349cae83dc to your computer and use it in GitHub Desktop.
Export selected patches to numbered files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Receive a list of revisions from rev-list. For each revision, generate a file | |
| # name from a commit subject, prefixed with a 4-digit count | |
| # | |
| # All this acrobatics only becuase format-patch refuses to generate a single | |
| # patch witout a numbered suffix | |
| git rev-list --reverse --left-only --no-merges --cherry-pick mainline/v3.17...github/juno-beta -- arch/arm64/{kernel,boot,mm} mm | | |
| xargs bash -c ' | |
| let "n = 0" | |
| for sha; do | |
| printf -v name "%04d-%s.patch" "$n" "$(git show -s --format=format:%f "$sha")" | |
| git format-patch --stdout -1 "$sha" > "../patches/$name" | |
| let "n++" | |
| done | |
| ' bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment