cherry-picker icon indicating copy to clipboard operation
cherry-picker copied to clipboard

[cherry-picker] [idea 💡] Extend backport sources

Open webknjaz opened this issue 7 years ago • 5 comments

I think with https://help.github.com/articles/checking-out-pull-requests-locally/ and https://gist.github.com/piscisaureus/3342247#gistcomment-1566295 cherry-picker could do better and even backport rebase merges and normal merge commits.

webknjaz avatar Jun 22 '18 12:06 webknjaz

@Mariatta please transfer this issue to a new repo.

webknjaz avatar Jun 22 '19 14:06 webknjaz

Not sure if this is related, but I would really love the ability to backport merge requests or a range of commits. Either pass cherry_picker a merge commit SHA and have it do the right thing (-m 1 maybe?), or have it accept a range like git cherry-pick does with [SHA]..[SHA].

samdoran avatar Aug 05 '21 15:08 samdoran

Actually, it looks like ranges work (I was just getting hit by a merge conflict and the --continue didn't to the right thing after resolving). It would still be handy to be able to pass in a merge commit, though.

samdoran avatar Aug 05 '21 16:08 samdoran

I think it wouldn't be hard to detect whether some commit is a merge. OTOH it could be harder to figure out whether to pass -m1 or -m2 (though could probably be done by inspecting the parents and checking if it belongs to the default branch).

webknjaz avatar Aug 05 '21 16:08 webknjaz

Right. I wasn't sure about the value for -m. That would take a bit more work and I don't really know how complicated that could get.

samdoran avatar Aug 05 '21 16:08 samdoran