Skip to content

Merged MR commit messages contain carriage returns

Summary

Merged MR commit messages contain carriage returns (\r).

Steps to reproduce

  1. Create and merge a Merge Request.
  2. Inspect the generated commit message, $ git show --merges --format=%B | od -c

What is the current bug behavior?

The commit message contains multiple carriage returns.

What is the expected correct behavior?

A commit message without any carriage returns.

Relevant logs and/or screenshots

For this repository, git show --format=%B 47767e68fe21407876f9d36d47ba91b0cbed0684 | od -c gives:

0000000   M   e   r   g   e       b   r   a   n   c   h       '   3   0
0000020   5   3   5   -   d   i   s   p   l   a   y   -   w   h   e   t
0000040   h   e   r   -   p   a   g   e   s   -   i   s   -   e   n   a
0000060   b   l   e   d   -   i   n   -   t   h   e   -   a   d   m   i
0000100   n   -   d   a   s   h   b   o   a   r   d   '       i   n   t
0000120   o       '   m   a   s   t   e   r   '  \r  \n  \r  \n   D   i
0000140   s   p   l   a   y       G   i   t   L   a   b       P   a   g
0000160   e   s       s   t   a   t   u   s       i   n       A   d   m
0000200   i   n       D   a   s   h   b   o   a   r   d  \r  \n  \r  \n
0000220   C   l   o   s   e   s       #   3   0   5   3   5  \r  \n  \r
0000240  \n   S   e   e       m   e   r   g   e       r   e   q   u   e
0000260   s   t       !   1   1   0   0   7  \n  \n
0000273

Output of checks

This bug happens on GitLab.com. My local git version is 2.11.0.