Skip to content

Preserve commit message whitespace/indentation on MR Pages

What does this MR do and why?

Switches the MR display of commits to use whitespace: pre-wrap instead of whitespace: pre-line.

Using pre-wrap allows lines to preserve their leading (and trailing! and intermediary!) whitespace while still supporting line-wrapping.

For #402697 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
Create
Commits Tab

How to set up and validate locally

  1. Create a commit with indented text in its body. You could copy the text from this commit
  2. Create an MR with the commit in it.
    1. Note the commit body text while on the MR creation form
  3. Navigate to the Commits tab of your new MR
    1. Note the commit body text on the Changes tab
Edited by Thomas Randolph

Merge request reports