diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php --- a/src/repository/api/ArcanistGitAPI.php +++ b/src/repository/api/ArcanistGitAPI.php @@ -535,7 +535,7 @@ $stdout = $this->getHashFromFromSVNRevisionNumber($match[1]); } else { list($stdout) = $this->execxLocal( - 'show -s --format=%C %s', + 'show -s --format=%s %s --', '%H', $string); } diff --git a/src/workflow/ArcanistBrowseWorkflow.php b/src/workflow/ArcanistBrowseWorkflow.php --- a/src/workflow/ArcanistBrowseWorkflow.php +++ b/src/workflow/ArcanistBrowseWorkflow.php @@ -104,9 +104,19 @@ $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. } }