]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Remove unused variable
authorvrana <jakubv@fb.com>
Sat, 2 Jun 2012 06:33:58 +0000 (23:33 -0700)
committervrana <jakubv@fb.com>
Sat, 2 Jun 2012 06:33:58 +0000 (23:33 -0700)
src/workflow/ArcanistLintWorkflow.php

index 96ed2109cc799bfb9c3af74aad9057481038c0d2..2504e7ba52a447409fb4bc11ecb50da05d8f6583 100644 (file)
@@ -264,8 +264,6 @@ EOTEXT
 
       if ($apply_patches && $result->isPatchable()) {
         $patcher = ArcanistLintPatcher::newFromArcanistLintResult($result);
-        $old = $patcher->getUnmodifiedFileContent();
-        $new = $patcher->getModifiedFileContent();
 
         if ($prompt_patches &&
             !($result_all_autofix && !$prompt_autofix_patches)) {
@@ -274,6 +272,7 @@ EOTEXT
             $old_file = '/dev/null';
           }
           $new_file = new TempFile();
+          $new = $patcher->getModifiedFileContent();
           Filesystem::writeFile($new_file, $new);
 
           // TODO: Improve the behavior here, make it more like