•  
      request #37561 Better commit message for PR merge commit with self resolving conflicts
    Infos
    #37561
    Jean-Marie Henaff (jmhenaff)
    2024-04-09 14:24
    2024-04-08 17:53
    39172
    Details
    Better commit message for PR merge commit with self resolving conflicts

    PROBLEM

    Currently, when a Pull Request is merged via the web UI, if the source and destination branch have conflicts, but these conflicts are automatically solvable by git merge (otherwise the merge from the web UI fails), a merge commit is created. The problem is that this merge commit is not really explanatory, e.g.:

    Merge commit '<commit hash>'
    

    To reproduce

    • create a branch and alter the same file on both source and destination branch, but a separate location, for example on line 1 on one branch and on line 5 on the other.
    • create a pull request from one branch to the other and press the "Merge" button.
    • Git will be able to solve the conflict for this file and a merge commit will be created, with the described commit message.

    SUGGESTED SOLUTION

    • Use a commit message like the one produced by git when the merge are made via the CLI
     Merge branch '<feature branch name>'
    

    or

    Merge branch 'master' into <feature branch name>
    

    (Maybe the ID of the PR could also be mentionned Closing PR#17,...)

    SCM/Git
    15.5
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    New
    Empty
    Attachments
    Empty
    References
    References list is empty

    Follow-ups

    User avatar
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes