]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Support browsing '.' and default to it
authorBen Alpert <spicyjalapeno@gmail.com>
Sun, 9 Feb 2014 17:00:54 +0000 (09:00 -0800)
committerepriestley <git@epriestley.com>
Sun, 9 Feb 2014 17:01:52 +0000 (09:01 -0800)
Test Plan: Ran 'arc browse', 'arc browse .', 'arc browse main.py'.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran, avivey
Differential Revision: https://secure.phabricator.com/D8174

src/workflow/ArcanistBrowseWorkflow.php

index e5e13ec01c523066bb0e5c053bcfe129550ad52f..3deaf229073c1fa11c0c09c32b11e7d8ea335043 100644 (file)
@@ -50,7 +50,7 @@ EOTEXT
       'branch' => array(
         'param' => 'branch_name',
         'help' =>
-          "Select branch name to view (On server). Defaults to 'master'."
+          "Select branch name to view (on server). Defaults to 'master'."
       ),
       '*' => 'paths',
     );
@@ -82,9 +82,11 @@ EOTEXT
       $path = preg_replace('/:([0-9]+)$/', '$\1', $path);
       $full_path = Filesystem::resolvePath($path);
 
-      $paths[$key] = Filesystem::readablePath(
-        $full_path,
-        $project_root);
+      if ($full_path == $project_root) {
+        $paths[$key] = '';
+      } else {
+        $paths[$key] = Filesystem::readablePath($full_path, $project_root);
+      }
     }
 
     if (!$paths) {