1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 08:12:40 +01:00

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
This commit is contained in:
epriestley 2020-05-30 14:30:07 -07:00
parent 6af46f289a
commit ff3cea78ee

View file

@ -78,10 +78,6 @@ EOTEXT
return true; return true;
} }
if ($this->getArgument('use-commit-message')) {
return true;
}
return false; return false;
} }
@ -106,19 +102,6 @@ EOTEXT
'When creating a revision, read revision information '. 'When creating a revision, read revision information '.
'from this file.'), '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( 'edit' => array(
'supports' => array( 'supports' => array(
'git', 'git',
@ -332,7 +315,6 @@ EOTEXT
'git', 'git',
), ),
'conflicts' => array( 'conflicts' => array(
'use-commit-message' => true,
'update' => true, 'update' => true,
'only' => true, 'only' => true,
'raw' => true, 'raw' => true,
@ -823,10 +805,6 @@ EOTEXT
return false; return false;
} }
if ($this->getArgument('use-commit-message')) {
return false;
}
if ($this->isRawDiffSource()) { if ($this->isRawDiffSource()) {
return true; return true;
} }
@ -1482,13 +1460,8 @@ EOTEXT
$is_create = $this->getArgument('create'); $is_create = $this->getArgument('create');
$is_update = $this->getArgument('update'); $is_update = $this->getArgument('update');
$is_raw = $this->isRawDiffSource(); $is_raw = $this->isRawDiffSource();
$is_message = $this->getArgument('use-commit-message');
$is_verbatim = $this->getArgument('verbatim'); $is_verbatim = $this->getArgument('verbatim');
if ($is_message) {
return $this->getCommitMessageFromCommit($is_message);
}
if ($is_verbatim) { if ($is_verbatim) {
return $this->getCommitMessageFromUser(); 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 * @task message
*/ */