From ff3cea78ee3a44ba31ff95bf0dceb18242dc737e Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 30 May 2020 14:30:07 -0700 Subject: [PATCH] Remove "--use-commit-message/-C" from "arc diff" Summary: Ref T13544. This flag was introduced in D1385 (2012) as part of a workflow which no longer exists. I can't recall anyone ever reporting an issue which involves its use and believe it is likely unused. It's not obvious to me why someone would use it in modern "arc". (The same goal can be accomplished with "--message-file ...", although this requires more steps.) Test Plan: Grepped for "use-commit-message" and "getCommitMessageFromCommit", ran "arc diff". Maniphest Tasks: T13544 Differential Revision: https://secure.phabricator.com/D21296 --- src/workflow/ArcanistDiffWorkflow.php | 39 --------------------------- 1 file changed, 39 deletions(-) diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php index 028adbe9..f0044625 100644 --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -78,10 +78,6 @@ EOTEXT return true; } - if ($this->getArgument('use-commit-message')) { - return true; - } - return false; } @@ -106,19 +102,6 @@ EOTEXT 'When creating a revision, read revision information '. 'from this file.'), ), - 'use-commit-message' => array( - 'supports' => array( - 'git', - // TODO: Support mercurial. - ), - 'short' => 'C', - 'param' => 'commit', - 'help' => pht('Read revision information from a specific commit.'), - 'conflicts' => array( - 'only' => null, - 'update' => null, - ), - ), 'edit' => array( 'supports' => array( 'git', @@ -332,7 +315,6 @@ EOTEXT 'git', ), 'conflicts' => array( - 'use-commit-message' => true, 'update' => true, 'only' => true, 'raw' => true, @@ -823,10 +805,6 @@ EOTEXT return false; } - if ($this->getArgument('use-commit-message')) { - return false; - } - if ($this->isRawDiffSource()) { return true; } @@ -1482,13 +1460,8 @@ EOTEXT $is_create = $this->getArgument('create'); $is_update = $this->getArgument('update'); $is_raw = $this->isRawDiffSource(); - $is_message = $this->getArgument('use-commit-message'); $is_verbatim = $this->getArgument('verbatim'); - if ($is_message) { - return $this->getCommitMessageFromCommit($is_message); - } - if ($is_verbatim) { return $this->getCommitMessageFromUser(); } @@ -1543,18 +1516,6 @@ EOTEXT } - /** - * @task message - */ - private function getCommitMessageFromCommit($commit) { - $text = $this->getRepositoryAPI()->getCommitMessage($commit); - $message = ArcanistDifferentialCommitMessage::newFromRawCorpus($text); - $message->pullDataFromConduit($this->getConduit()); - $this->validateCommitMessage($message); - return $message; - } - - /** * @task message */