mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-07 13:21:02 +01:00
ae3c1f7819
Summary: Ref T2222. Ref T3886. Converts parsing and construction of commit messages to be driven by CustomField. Test Plan: This is a huge, messy change. I've made an effort to test it exhasutively, but suspect I probably missed a few behaviors. Roughly: - Enumerted all current fields (fields implementing `shouldAppearOnCommitMessage()`) and tried to test them one by one. - Used `arc diff --edit` repeatedly to manipulate each field (this workflow hits both the parse and construct steps). - Used `arc amend --show` to examine construct output (this does not activate the "edit" mode). Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3886, T2222 Differential Revision: https://secure.phabricator.com/D8449
45 lines
938 B
PHP
45 lines
938 B
PHP
<?php
|
|
|
|
/**
|
|
* This field doesn't do anything, it just parses the "git-svn-id" field which
|
|
* `git svn` inserts into commit messages so that we don't end up mangling
|
|
* some other field.
|
|
*/
|
|
final class DifferentialGitSVNIDField
|
|
extends DifferentialCustomField {
|
|
|
|
public function getFieldKey() {
|
|
return 'differential:git-svn-id';
|
|
}
|
|
|
|
public function getFieldKeyForConduit() {
|
|
return 'gitSVNID';
|
|
}
|
|
|
|
public function getFieldName() {
|
|
return pht('git-svn-id');
|
|
}
|
|
|
|
public function getFieldDescription() {
|
|
return pht(
|
|
'Parses the "git-svn-id" field which Git/SVN can inject into commit '.
|
|
'messages.');
|
|
}
|
|
|
|
public function canDisableField() {
|
|
return false;
|
|
}
|
|
|
|
public function shouldAppearInCommitMessage() {
|
|
return true;
|
|
}
|
|
|
|
public function shouldAllowEditInCommitMessage() {
|
|
return false;
|
|
}
|
|
|
|
public function renderCommitMessageValue(array $handles) {
|
|
return null;
|
|
}
|
|
|
|
}
|