mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 17:52:43 +01:00
0dcc4132be
Summary: Fixes T6395. Ref T6350. I guess I missed this code spot in prior testing / I definitely didn't run an empty commit through it. Works now though. Test Plan: made an empty commit and observed stuck importing status and errors in phd log. applied patch and commit successfully imported with no errors. made another empty commit and it imported as well Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6350, T6395 Differential Revision: https://secure.phabricator.com/D10746
37 lines
771 B
PHP
37 lines
771 B
PHP
<?php
|
|
|
|
final class DiffusionCommitHash extends Phobject {
|
|
|
|
private $hashType;
|
|
private $hashValue;
|
|
|
|
public function setHashValue($hash_value) {
|
|
$this->hashValue = $hash_value;
|
|
return $this;
|
|
}
|
|
|
|
public function getHashValue() {
|
|
return $this->hashValue;
|
|
}
|
|
|
|
public function setHashType($hash_type) {
|
|
$this->hashType = $hash_type;
|
|
return $this;
|
|
}
|
|
|
|
public function getHashType() {
|
|
return $this->hashType;
|
|
}
|
|
|
|
public static function convertArrayToObjects(array $hashes) {
|
|
$hash_objects = array();
|
|
foreach ($hashes as $hash) {
|
|
$type = $hash[0];
|
|
$hash = $hash[1];
|
|
$hash_objects[] = id(new DiffusionCommitHash())
|
|
->setHashType($type)
|
|
->setHashValue($hash);
|
|
}
|
|
return $hash_objects;
|
|
}
|
|
}
|