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,6 +104,12 @@ $commits = array(); foreach ($things as $key => $thing) { + if ($thing == '.') { + // Git resolves '.' like HEAD, but it should be interpreted to mean + // "the current directory". Just skip resolution and fall through. + continue; + } + $commit = $repository_api->getCanonicalRevisionName($thing); if ($commit) { $commits[$commit] = $key;