Unverified Commit d906a879 by Edward Thomson Committed by GitHub

Merge pull request #4476 from pks-t/pks/backport-script

scripts: add backporting script
parents 8529ac9b 0b3d8592
#!/bin/sh
if test $# -eq 0
then
echo "USAGE: $0 <#PR> [<#PR>...]"
exit
fi
commits=
for pr in $*
do
mergecommit=$(git rev-parse ":/Merge pull request #$pr" || exit 1)
mergebase=$(git merge-base "$mergecommit"^1 "$mergecommit"^2 || exit 1)
commits="$commits $(git rev-list --reverse "$mergecommit"^2 ^"$mergebase")"
done
echo "Cherry-picking the following commits:"
git rev-list --no-walk --oneline $commits
echo
git cherry-pick $commits
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment