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:
epriestley
2013-10-30 13:06:09 -07:00
parent 7360688afb
commit 3bf372c60c
8 changed files with 236 additions and 77 deletions

View 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;
}
}