• Kirill Smelkov's avatar
    NXD Teach GitLab about patches · 1aafce0d
    Kirill Smelkov authored
    Teach GitLab not only to merge changes from a merge-request, but also to
    apply patches posted to merge-request in a way like `git am` would do -
    without merge commit and directly on top of current branch. Which way to
    go is selected by user in web UI, and apply patches is the first option.
    
    There are 3 cases:
    
    - only 1 commit is present in MR -> the only available option is to
      apply that single commit as one patch without a merge
    
      ( There is no need for merge commit in this case at all: information
        about user who applied the patch goes to "Committer" field in resultant
        commit. Avoiding 1 merge per 1 patch results in cleaner history )
    
      It is also possible to review patch description directly in web UI,
      before doing the actual application, and correct / amend it as needed.
    
    - several commits are present in MR:
    
      * it is possible to apply the patches directly on top of current
        branch. Again information about who applied what goes to "Committer"
        field.
    
    ...
    1aafce0d
merge_request.rb 15.6 KB