Homec4science

Use only the first line of update comment in revision history description

Authored by vrana <jakubv@fb.com> on Mar 7 2012, 20:52.

Description

Use only the first line of update comment in revision history description

Summary:
More complicated updates deserves title and explanation.
This diff uses only the first line from comment in diff's description.
It also removes the truncating at 80 chars which looks as an error.

Test Plan:

var_dump(preg_replace('/\n.*/s', '', "abc"));
var_dump(preg_replace('/\n.*/s', '', "abc\ndef"));
var_dump(preg_replace('/\n.*/s', '', "abc\ndef"));
var_dump(preg_replace('/\n.*/s', '', "abc\ndef\nghi"));
var_dump(preg_replace('/\n.*/s', '', "\nabc")); // empty string

Display revision with 255 chars description in update history - it looks OK.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1812

Details

Committed
vrana <jakubv@fb.com>Mar 7 2012, 23:40
Pushed
aubortJan 31 2017, 17:16
Parents
rPH8dfe8e84f0e9: Improve Diffusion parsing of submoudule changes
Branches
Unknown
Tags
Unknown

Event Timeline