From: vrana Date: Sat, 15 Sep 2012 01:46:33 +0000 (-0700) Subject: Handle `arc diff --background 1 --` X-Git-Tag: conduit-6~121 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=589bccb716c4b091719c8ad4f37e980823df1c1e;p=arcanist.git Handle `arc diff --background 1 --` Summary: We currently insert background parameters to end which causes ignoring them if there is '--'. Test Plan: $ arc diff --background 1 -- HEAD^ Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3497 --- diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php index 1c2a8055..441b0f74 100644 --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -373,10 +373,13 @@ EOTEXT if ($this->getArgument('background')) { $argv = $_SERVER['argv']; + // Insert after `arc diff`. + array_splice($argv, 2, 0, array('--recon', '--no-diff')); if (!PhutilConsoleFormatter::getDisableANSI()) { - $argv[] = '--ansi'; + // Insert after `arc`. + array_splice($argv, 1, 0, array('--ansi')); } - $lint_unit = new ExecFuture('%Ls --recon --no-diff', $argv); + $lint_unit = new ExecFuture('%Ls', $argv); $lint_unit->write('', true); $lint_unit->start(); }