From 5280f3708ef7d291b5746459bc033409d7a8740c Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 1 Apr 2014 08:21:05 -0700 Subject: [PATCH] Strip comments during `arc diff --verbatim` workflow before submitting to Phabricator Summary: Fixes T4649. The issue in that task is caused because we're submitting a block of text including comments. We've probably been doing this for a long time, but maybe were more liberal in parsing before. Instead, strip them. Test Plan: Ran `arc diff --verbatim` and got "Dxxx" prefilled correctly. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T4649 Differential Revision: https://secure.phabricator.com/D8658 --- src/workflow/ArcanistDiffWorkflow.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php index fe02de89..7a69ada3 100644 --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -745,6 +745,8 @@ EOTEXT if ($this->commitMessageFromRevision == $remote_corpus) { $new_message = $message; } else { + $remote_corpus = ArcanistCommentRemover::removeComments( + $remote_corpus); $new_message = ArcanistDifferentialCommitMessage::newFromRawCorpus( $remote_corpus); $new_message->pullDataFromConduit($conduit); -- 2.43.0