mesamatrix icon indicating copy to clipboard operation
mesamatrix copied to clipboard

Only include the first line of the commit messages

Open vanillajonathan opened this issue 4 years ago • 2 comments

Only include the first line commit messages to prevent horizontal scrolling.

Example of a commit with a long message: https://gitlab.freedesktop.org/mesa/mesa/commit/84e707e6f2292dd886b8385fab0ced5122e35876

docs/features: Update virgl OpenGL 4.5 features

GL_ARB_clip_control and GL_KHR_robustness are now expose in the guest.

Mesamatrix displays this as:

"docs/features: Update virgl OpenGL 4.5 features GL_ARB_clip_control and GL_KHR_robustness are now expose in the guest."

Also of interest is to investigate the text-overflow CSS property.

vanillajonathan avatar Apr 07 '20 12:04 vanillajonathan

Partially fixed with #159 and #160. But indeed it should only take the first line.

MightyCreak avatar Apr 20 '20 03:04 MightyCreak

Maybe something like this:

$lines = explode("\n", $commit_message);
$subject = $lines[0];

Can also be written as:

$subject = explode("\n", $commit_message)[0];

vanillajonathan avatar Apr 20 '20 08:04 vanillajonathan