]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Treat empty update message as user abort on 'arc diff' workflow
authorepriestley <epriestley@phabricator.com>
Sat, 5 Feb 2011 00:06:18 +0000 (16:06 -0800)
committerepriestley <epriestley@phabricator.com>
Sat, 5 Feb 2011 00:08:53 +0000 (16:08 -0800)
Summary:
"-m ''" will still let you do a truly empty update if
you are insistent on that.

Test Plan:
meta

Differential Revision: 209194
Reviewed By: dschleimer
Reviewers: dschleimer
CC: epriestley
Revert Plan:
OK

src/workflow/diff/ArcanistDiffWorkflow.php

index 974253a7f2253c3974df2eb8769966fec858a4cc..011b49f6a89756c5393e7bd67c872d83b4a59992 100644 (file)
@@ -833,6 +833,11 @@ EOTEXT
         ->setName('differential-update-comments')
         ->editInteractively();
       $comments = preg_replace('/^\s*#.*$/m', '', $comments);
+
+      $comments = rtrim($comments);
+      if (!strlen($comments)) {
+        throw new ArcanistUserAbortException();
+      }
     }
 
     return $comments;