Add option to match author timestamp and committed timestamp
When true, the author date is changed to match the submitter date upon submission of a change. This is done so that git log will show the submission date instead of the author date, which it does by default. This option only takes effect in submit strategies which already modify the commit, i.e. Cherry Pick, Rebase Always, and (perhaps) Rebase If Necessary. Bug: https://crbug.com/732968 Change-Id: I64133a3e494e8c6364cd210f68979aaff74cb222
This commit is contained in:
@@ -88,6 +88,8 @@ public class ProjectConfig extends VersionedMetaData implements ValidationError.
|
||||
|
||||
private static final String PROJECT = "project";
|
||||
private static final String KEY_DESCRIPTION = "description";
|
||||
private static final String KEY_MATCH_AUTHOR_DATE_WITH_COMMITTER_DATE =
|
||||
"matchAuthorToCommitterDate";
|
||||
|
||||
public static final String ACCESS = "access";
|
||||
private static final String KEY_INHERIT_FROM = "inheritFrom";
|
||||
@@ -532,6 +534,13 @@ public class ProjectConfig extends VersionedMetaData implements ValidationError.
|
||||
|
||||
p.setSubmitType(getEnum(rc, SUBMIT, null, KEY_ACTION, DEFAULT_SUBMIT_ACTION));
|
||||
p.setUseContentMerge(getEnum(rc, SUBMIT, null, KEY_MERGE_CONTENT, InheritableBoolean.INHERIT));
|
||||
p.setMatchAuthorToCommitterDate(
|
||||
getEnum(
|
||||
rc,
|
||||
SUBMIT,
|
||||
null,
|
||||
KEY_MATCH_AUTHOR_DATE_WITH_COMMITTER_DATE,
|
||||
InheritableBoolean.INHERIT));
|
||||
p.setState(getEnum(rc, PROJECT, null, KEY_STATE, DEFAULT_STATE_VALUE));
|
||||
|
||||
p.setDefaultDashboard(rc.getString(DASHBOARD, null, KEY_DEFAULT));
|
||||
@@ -1036,7 +1045,6 @@ public class ProjectConfig extends VersionedMetaData implements ValidationError.
|
||||
rc.unset(PROJECT, null, KEY_DESCRIPTION);
|
||||
}
|
||||
set(rc, ACCESS, null, KEY_INHERIT_FROM, p.getParentName());
|
||||
|
||||
set(
|
||||
rc,
|
||||
RECEIVE,
|
||||
@@ -1102,6 +1110,13 @@ public class ProjectConfig extends VersionedMetaData implements ValidationError.
|
||||
|
||||
set(rc, SUBMIT, null, KEY_ACTION, p.getSubmitType(), DEFAULT_SUBMIT_ACTION);
|
||||
set(rc, SUBMIT, null, KEY_MERGE_CONTENT, p.getUseContentMerge(), InheritableBoolean.INHERIT);
|
||||
set(
|
||||
rc,
|
||||
SUBMIT,
|
||||
null,
|
||||
KEY_MATCH_AUTHOR_DATE_WITH_COMMITTER_DATE,
|
||||
p.getMatchAuthorToCommitterDate(),
|
||||
InheritableBoolean.INHERIT);
|
||||
|
||||
set(rc, PROJECT, null, KEY_STATE, p.getState(), DEFAULT_STATE_VALUE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user