1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

Don't trim indentation in arc amend

Summary:
When there is a single line Test Plan (or anything else) then `arc amend` puts it on the same line as label.
It is a problem with indented line (as in this diff) because next run of `arc diff` will trim the leading spaces.

Test Plan:   arc amend

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2054
This commit is contained in:
vrana 2012-03-29 12:04:56 -07:00
parent 8acd596925
commit 280b852922

View file

@ -129,7 +129,7 @@ final class ConduitAPI_differential_getcommitmessage_Method
array("\r\n", "\r"),
array("\n", "\n"),
$value);
if (strpos($value, "\n") !== false) {
if (strpos($value, "\n") !== false || substr($value, 0, 2) === " ") {
$commit_message[] = "{$label}:\n{$value}";
} else {
$commit_message[] = "{$label}: {$value}";