]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix ambiguous argument where a branch has the same name as a file
authorepriestley <git@epriestley.com>
Sun, 22 Jul 2012 20:19:09 +0000 (13:19 -0700)
committerepriestley <git@epriestley.com>
Sun, 22 Jul 2012 20:19:09 +0000 (13:19 -0700)
Summary: Currently, if you have a branch named "docs" and a local file named "docs", `git show -s docs` complains because it's ambiguous. Use `--` to unambiguously mark branches as revisions, not files.

Test Plan: Ran `arc branch` in a working copy with a "docs" branch and a "docs" file, got expected results.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran
Differential Revision: https://secure.phabricator.com/D3030

src/workflow/ArcanistBranchWorkflow.php

index 9d6b3a6856d4731a02092ea8db72092064b63f00..0bab773fe58ec0b7f625d3f30bc4b6f6d97db697 100644 (file)
@@ -102,7 +102,7 @@ EOTEXT
       // seem to have much documentation and has no long form. It suppresses any
       // diff output.
       $futures[$branch['name']] = $repository_api->execFutureLocal(
-        'show -s --format=%C %s',
+        'show -s --format=%C %s --',
         '%H%x01%ct%x01%T%x01%s%x01%b',
         $branch['name']);
     }