From c320e0987d6e7578994840671bb722366c692d14 Mon Sep 17 00:00:00 2001 From: vrana Date: Fri, 13 Apr 2012 16:21:23 -0700 Subject: [PATCH] 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 --- src/workflow/diff/ArcanistDiffWorkflow.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 ".