mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
Make differential revision ID parsing more robust
Summary: If something that doesn't belong to any field appears in the commit message below the differential revision field, it gets included as part of the value for the field, which can mess up parsing. Test Plan: called differential.parsecommitmessage on a commit whose differential revision field wasn't being parsed earlier (it had a line of dashes two lines below the Differential Revision: line). Reviewers: epriestley, vrana Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4171
This commit is contained in:
parent
cce5ebebe9
commit
e7bcdcdb94
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ final class DifferentialRevisionIDFieldSpecification
|
|||
}
|
||||
|
||||
public function parseValueFromCommitMessage($value) {
|
||||
$rev = trim($value);
|
||||
$rev = trim(head(explode("\n", $value)));
|
||||
|
||||
if (!strlen($rev)) {
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue