From 589bccb716c4b091719c8ad4f37e980823df1c1e Mon Sep 17 00:00:00 2001 From: vrana Date: Fri, 14 Sep 2012 18:46:33 -0700 Subject: [PATCH] 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 --- src/workflow/ArcanistDiffWorkflow.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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(); } -- 2.43.0