Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to forwardport a change #172

Closed
dakrone opened this issue Mar 31, 2020 · 1 comment
Closed

Add the ability to forwardport a change #172

dakrone opened this issue Mar 31, 2020 · 1 comment

Comments

@dakrone
Copy link

dakrone commented Mar 31, 2020

Occasionally I do work on a non-master branch and want to forwardport a PR to the master branch, however, even if I manually specify the SHA and branch:

~/es/elasticsearch (git) 0f312c8b  7.x [origin/7.x] (2 stashed)
» backport --sha 0f312c8b381fe19b69964f1ef677c9c46ed844b7 --branch master       
✖ Loading commit "0f312c8b"
No commit found on master with sha "0f312c8b381fe19b69964f1ef677c9c46ed844b7"

It appears to look for the sha on the master branch instead of 7.x.

It'd be great to be able to forwardport though!

@sorenlouv
Copy link
Owner

sorenlouv commented Apr 1, 2020

Hey!

This is already possible - but not very well documented, and it should probably work as you suggest.

By using the sourceBranch argument, you can pick commits from a non-master branch:

The following will list commits on 7.x and backport the selected commit to master:

backport --sourceBranch 7.x --branch master

The following currently doesn't work, but I'll look into fixing it:

backport --sourceBranch 7.x --branch master --sha 0f312c8b381fe19b69964f1ef677c9c46ed844b7
backport --branch master --sha 0f312c8b381fe19b69964f1ef677c9c46ed844b7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants