Consolidate querying of things which we can use git for-each-ref for
Summary: Ref T2230. This cleans up D7442, by using `git for-each-ref` everywhere we can, in a basically reasonable way. Test Plan: In bare and non-bare repositories: - Ran discovery with `bin/repository discover`; - listed branches on `/diffusion/X/`; - listed tags on `/diffusion/X/`; - listed tags, branches and refs on `/diffusion/rXnnnn`. Reviewers: btrahan, avivey Reviewed By: avivey CC: aran Maniphest Tasks: T2230 Differential Revision: https://secure.phabricator.com/D7447
This commit is contained in:
36
src/applications/diffusion/data/DiffusionRepositoryRef.php
Normal file
36
src/applications/diffusion/data/DiffusionRepositoryRef.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionRepositoryRef {
|
||||
|
||||
private $shortName;
|
||||
private $commitIdentifier;
|
||||
private $rawFields;
|
||||
|
||||
public function setRawFields(array $raw_fields) {
|
||||
$this->rawFields = $raw_fields;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRawFields() {
|
||||
return $this->rawFields;
|
||||
}
|
||||
|
||||
public function setCommitIdentifier($commit_identifier) {
|
||||
$this->commitIdentifier = $commit_identifier;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCommitIdentifier() {
|
||||
return $this->commitIdentifier;
|
||||
}
|
||||
|
||||
public function setShortName($short_name) {
|
||||
$this->shortName = $short_name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getShortName() {
|
||||
return $this->shortName;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user