We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8529ac9 + 0b3d859 commit d906a87Copy full SHA for d906a87
script/backport.sh
@@ -0,0 +1,23 @@
1
+#!/bin/sh
2
+
3
+if test $# -eq 0
4
+then
5
+ echo "USAGE: $0 <#PR> [<#PR>...]"
6
+ exit
7
+fi
8
9
+commits=
10
11
+for pr in $*
12
+do
13
+ mergecommit=$(git rev-parse ":/Merge pull request #$pr" || exit 1)
14
+ mergebase=$(git merge-base "$mergecommit"^1 "$mergecommit"^2 || exit 1)
15
16
+ commits="$commits $(git rev-list --reverse "$mergecommit"^2 ^"$mergebase")"
17
+done
18
19
+echo "Cherry-picking the following commits:"
20
+git rev-list --no-walk --oneline $commits
21
+echo
22
23
+git cherry-pick $commits
0 commit comments