From: vrana Date: Fri, 13 Apr 2012 23:21:23 +0000 (-0700) Subject: Don't advice using --less-context if already used X-Git-Tag: conduit-4~44 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=c320e0987d6e7578994840671bb722366c692d14;p=arcanist.git Don't advice using --less-context if already used Test Plan: arc diff arc diff --less-context Reviewers: blair CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D2233 --- diff --git a/src/workflow/diff/ArcanistDiffWorkflow.php b/src/workflow/diff/ArcanistDiffWorkflow.php index 13e6df2b..e8e40078 100644 --- a/src/workflow/diff/ArcanistDiffWorkflow.php +++ b/src/workflow/diff/ArcanistDiffWorkflow.php @@ -733,8 +733,12 @@ EOTEXT $change_size = number_format($size); $byte_warning = "Diff for '{$file_name}' with context is {$change_size} bytes in ". - "length. Generally, source changes should not be this large. If ". - "this file is a huge text file, try using the '--less-context' flag."; + "length. Generally, source changes should not be this large."; + if (!$this->getArgument('less-context')) { + $byte_warning .= + " If this file is a huge text file, try using the ". + "'--less-context' flag."; + } if ($repository_api instanceof ArcanistSubversionAPI) { throw new ArcanistUsageException( "{$byte_warning} If the file is not a text file, mark it as ".