Skip to content

Enable cherry-picking for fast-forward commits, if we know that they were squashed or only one commit.

Summary

The "Cherry-pick" button shows up in a merged MR if repo setting is "Merge Commit" but not if repo setting is "Fast-forward Merge"

Steps to reproduce

Have a repo configured to the "Merge Commit" setting Make a merge request, merge it Notice the "cherry pick button" Change the repo setting to "Fast-forward Merge"

Example Project

cjcjameson/demo-cherry-pick-button-only-on-some-MR-screens!1 (merged)

cjcjameson/demo-cherry-pick-button-only-on-some-MR-screens!2 (merged)

What is the current bug behavior?

If a repo is configured for "Fast forward merge" When I merge a MR There's a big blank white area to the right of the name of the merge request (no button)

What is the expected correct behavior?

If a repo is configured for "Fast forward merge" When I merge a MR Then I can click a button in the same screen to start a cherry-pick merge request

Relevant logs and/or screenshots

When "Merge Commit" is the setting

image

When "Fast-forward Commit" is the setting --> no cherry-pick option!

image

Results of GitLab environment info

Gitlab EE 10.6.1

Possible fixes

The workaround is to click through to the commit that went in, and in the ... (meatballs) menu in the upper right, there's an option to cherry-pick it. That works, it's just 3 more clicks and you don't even know it's an available option

Edited by C.J. Jameson