Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
d906a879
Unverified
Commit
d906a879
authored
7 years ago
by
Edward Thomson
Committed by
GitHub
7 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4476 from pks-t/pks/backport-script
scripts: add backporting script
parents
8529ac9b
0b3d8592
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
script/backport.sh
+23
-0
No files found.
script/backport.sh
0 → 100755
View file @
d906a879
#!/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
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment