Browse files

Adding `--` to the end of git log so can `arc land` when the branch is

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
  • Loading branch information...
sanpath authored and epriestley committed Apr 22, 2013
1 parent 9047408 commit 410ea5dc328c826dc1d0747ea970aa6ad981fc45
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/workflow/ArcanistLandWorkflow.php
@@ -353,7 +353,7 @@ private function printPendingCommits() {
if ($repository_api instanceof ArcanistGitAPI) {
list($out) = $repository_api->execxLocal(
- 'log --oneline %s %s',
+ 'log --oneline %s %s --',
} else if ($repository_api instanceof ArcanistMercurialAPI) {

0 comments on commit 410ea5d

Please sign in to comment.