Summary: Ref T5781. `git show .` works like HEAD, but that isn't what `arc browse .` means.
Test Plan: Ran `arc browse .` with a repository at a published commit.
Reviewers: chad, btrahan, avive, avivey
Reviewed By: avivey
Subscribers: epriestley, avivey
Maniphest Tasks: T5781
Differential Revision: https://secure.phabricator.com/D10197
$stdout = $this->getHashFromFromSVNRevisionNumber($match[1]);
} else {
list($stdout) = $this->execxLocal(
- 'show -s --format=%C %s',
+ 'show -s --format=%s %s --',
'%H',
$string);
}
$commits = array();
foreach ($things as $key => $thing) {
- $commit = $repository_api->getCanonicalRevisionName($thing);
- if ($commit) {
- $commits[$commit] = $key;
+ if ($thing == '.') {
+ // Git resolves '.' like HEAD, but it should be interpreted to mean
+ // "the current directory". Just skip resolution and fall through.
+ continue;
+ }
+
+ try {
+ $commit = $repository_api->getCanonicalRevisionName($thing);
+ if ($commit) {
+ $commits[$commit] = $key;
+ }
+ } catch (Exception $ex) {
+ // Ignore.
}
}