From: epriestley Date: Sat, 5 Feb 2011 00:06:18 +0000 (-0800) Subject: Treat empty update message as user abort on 'arc diff' workflow X-Git-Tag: conduit-4~421 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=c97b736a21001f180ed9070d853aa0fc85fedbe2;p=arcanist.git Treat empty update message as user abort on 'arc diff' workflow 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 --- diff --git a/src/workflow/diff/ArcanistDiffWorkflow.php b/src/workflow/diff/ArcanistDiffWorkflow.php index 974253a7..011b49f6 100644 --- a/src/workflow/diff/ArcanistDiffWorkflow.php +++ b/src/workflow/diff/ArcanistDiffWorkflow.php @@ -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;