]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Avoid double indenting in console wrapping
authorvrana <jakubv@fb.com>
Thu, 29 Mar 2012 04:38:31 +0000 (21:38 -0700)
committervrana <jakubv@fb.com>
Thu, 29 Mar 2012 05:28:15 +0000 (22:28 -0700)
Summary:
D2016 changed the behavior of `phutil_console_wrap()`.
The new behavior is better so I am fixing callsites instead of the function.

Test Plan:
  arc help help

Verify that the options descriptions is not indented with 28 spaces.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D2047

src/lint/renderer/ArcanistLintRenderer.php
src/workflow/diff/ArcanistDiffWorkflow.php
src/workflow/help/ArcanistHelpWorkflow.php

index fa966fe119639e688659ed0b3b8df95235f6be83..baa1e11677418a0a074e27940ddfd27ff6a3b82a 100644 (file)
@@ -45,8 +45,7 @@ final class ArcanistLintRenderer {
       $description = phutil_console_wrap($message->getDescription(), 4);
 
       $text[] = phutil_console_format(
-        "  **<bg:{$color}> %s </bg>** (%s) __%s__\n".
-        "    %s\n",
+        "  **<bg:{$color}> %s </bg>** (%s) __%s__\n%s\n",
         $severity,
         $code,
         $name,
index 401f7edde7696b322284f0f0dca242be21511e42..1959d447a6d072fda620e56d5e5c838c4e63f2a0 100644 (file)
@@ -624,7 +624,7 @@ EOTEXT
           "\n\n".
           "Modified 'svn:externals' files:".
           "\n\n".
-          '        '.phutil_console_wrap(implode("\n", $warn_externals), 8));
+          phutil_console_wrap(implode("\n", $warn_externals), 8));
         $prompt = "Generate a diff (with just local changes) anyway?";
         if (!phutil_console_confirm($prompt)) {
           throw new ArcanistUserAbortException();
index 1ff79ee8420f027cf75e62540c9ebdd59cfab0ab..47de7394dee6bb1d0521753ed50c3afd71d64577 100644 (file)
@@ -138,7 +138,7 @@ EOTEXT
           $docs = 'This option is not documented.';
         }
         $docs = phutil_console_wrap($docs, 14);
-        $optref[] = "              {$docs}\n";
+        $optref[] = "{$docs}\n";
       }
       if ($optref) {
         $optref = implode("\n", $optref);