1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-22 19:49:02 +01:00

Deduplicating duplicated field values for Commit Messages / Differential

Summary: Especially when doing 'arc diff' containing multiple commits which have pre-filled template fields. Names would pop up multiple times

Test Plan:
{F36314}

Local `arc diff` with some uber-branch also agrees with me

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5371
This commit is contained in:
Anh Nhan Nguyen 2013-03-18 10:37:40 -04:00 committed by epriestley
parent 23d72d7e24
commit 1a92976c14
3 changed files with 3 additions and 3 deletions

View file

@ -73,7 +73,7 @@ final class DifferentialCCsFieldSpecification
} }
public function setValueFromParsedCommitMessage($value) { public function setValueFromParsedCommitMessage($value) {
$this->ccs = nonempty($value, array()); $this->ccs = array_unique(nonempty($value), array());
return $this; return $this;
} }

View file

@ -92,7 +92,7 @@ final class DifferentialManiphestTasksFieldSpecification
} }
public function setValueFromParsedCommitMessage($value) { public function setValueFromParsedCommitMessage($value) {
$this->maniphestTasks = nonempty($value, array()); $this->maniphestTasks = array_unique(nonempty($value), array());
return $this; return $this;
} }

View file

@ -91,7 +91,7 @@ final class DifferentialReviewersFieldSpecification
} }
public function setValueFromParsedCommitMessage($value) { public function setValueFromParsedCommitMessage($value) {
$this->reviewers = nonempty($value, array()); $this->reviewers = array_unique(nonempty($value), array());
return $this; return $this;
} }