]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Strip comments during `arc diff --verbatim` workflow before submitting to Phabricator
authorepriestley <git@epriestley.com>
Tue, 1 Apr 2014 15:21:05 +0000 (08:21 -0700)
committerepriestley <git@epriestley.com>
Tue, 1 Apr 2014 15:21:05 +0000 (08:21 -0700)
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

index fe02de8957ca7888f16ad72268a71df704379b4d..7a69ada353be2e5538329df0df0852385f38ae73 100644 (file)
@@ -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);