From c97b736a21001f180ed9070d853aa0fc85fedbe2 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 4 Feb 2011 16:06:18 -0800 Subject: [PATCH] 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 --- src/workflow/diff/ArcanistDiffWorkflow.php | 5 +++++ 1 file changed, 5 insertions(+) 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;