Page MenuHomePhabricator

D10197.diff
No OneTemporary

D10197.diff

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.
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 30, 12:11 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7387879
Default Alt Text
D10197.diff (1 KB)

Event Timeline