From: vrana Date: Wed, 24 Oct 2012 18:23:10 +0000 (-0700) Subject: Disallow using DD1 as revision ID X-Git-Tag: conduit-6~57 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2d226f3110063c8e0f4b53964d745805b356a3d7;p=arcanist.git Disallow using DD1 as revision ID Test Plan: $ arc inlines --revision 1 $ arc inlines --revision D1 $ arc inlines --revision DD1 Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3811 --- diff --git a/src/workflow/ArcanistBaseWorkflow.php b/src/workflow/ArcanistBaseWorkflow.php index 0547f845..7e9e774d 100644 --- a/src/workflow/ArcanistBaseWorkflow.php +++ b/src/workflow/ArcanistBaseWorkflow.php @@ -954,7 +954,7 @@ abstract class ArcanistBaseWorkflow { } protected function normalizeRevisionID($revision_id) { - return ltrim(strtoupper($revision_id), 'D'); + return preg_replace('/^D/i', '', $revision_id); } protected function shouldShellComplete() {