]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Adding `--` to the end of git log so can `arc land` when the branch is
authorsan <oldhobb@gmail.com>
Mon, 22 Apr 2013 03:54:51 +0000 (20:54 -0700)
committerepriestley <git@epriestley.com>
Tue, 23 Apr 2013 13:37:38 +0000 (06:37 -0700)
named the same as a file path.

Summary: (In fbcode and www at least, the only places I tried) if a
branch happens to be named the same as a file path (from root) (like if
a branch is called `spec` and there is a directory in `www` called
`spec`) then `arc land` will fail with git complaining that the argument
(to `git log ...`) is ambiguous as it could refer to both a path and a
revision; so this diff adds a `--` to the end so that git knows that
both are revisions and not paths.

Test Plan: Try and land something from www (I did, see D752219) where
the branch is named `spec`.

Reviewed by: epriestley

src/workflow/ArcanistLandWorkflow.php

index 69e2f8f0d66168ce1a6ea6070977e0eac071dec2..aa55e0622529844a8b0ce94c9b913936d1e7c30b 100644 (file)
@@ -353,7 +353,7 @@ EOTEXT
 
     if ($repository_api instanceof ArcanistGitAPI) {
       list($out) = $repository_api->execxLocal(
-        'log --oneline %s %s',
+        'log --oneline %s %s --',
         $this->branch,
         '^'.$this->onto);
     } else if ($repository_api instanceof ArcanistMercurialAPI) {