NXD Add support for apply patch in Merge request
If there is only 1 commit is present in MR, apply patch buttun is enabled allow to merge the MR in a single commit.
-
Maintainer
@tomo @jerome @kirr This commit is adding
apply patch
button for MR with 1 commit.As we discussed with @tomo, I'm going to enable it for MR with more than one commits and it will do
Fast Forward Merge
, by calling https://lab.nexedi.com/nexedi/gitlab-ce/-/blob/v13.12.15-nxd/lib/gitlab/git/repository.rb#L614. It's not possible withff_merge
to update commit message, gitlab add a link to the MR in the commit page (see this one: slapos@9227dd59). -
Owner
@alain.takoudjou, @tomo, thanks for heads up and for bringing "Apply patch" back. It is really good to see.
I have one suggestion: for multipatch case instead of going through fast-forward merge, we could loop through all patches in the merge-request and cherry-pick them one by one like we already do for single-patch case. Then adding
/reviewed-on ...
line to each patch should be relatively straightforward.Thanks, once again, for reviwing the "apply patch" story.
Kirill -
Maintainer
for multipatch case instead of going through fast-forward merge, we could loop through all patches in the merge-request and cherry-pick them one by one ...
Yes maybe better because ff need rebase, @tomo ?