Add rejectEmptyCommit project config
If a change is identified as the root cause of a problem, different users sometimes create reverts independently and try to submit them. The first revert merges cleanly and reverts the problematic code. The second revert rebases cleanly, but results in an empty commit that is then merged. Some users don't want empty commits in their project. This commit adds a project config to prevent empty commits as a result of merging changes in Gerrit. The UI will be adapted in a later commit to allow easy modifications of the new config option. Change-Id: Ied0c501a6cb8963328440074529834cb43e96439
This commit is contained in:
@@ -436,6 +436,7 @@ public abstract class AbstractDaemonTest {
|
||||
in.useContentMerge = ann.useContributorAgreements();
|
||||
in.useSignedOffBy = ann.useSignedOffBy();
|
||||
in.useContentMerge = ann.useContentMerge();
|
||||
in.rejectEmptyCommit = ann.rejectEmptyCommit();
|
||||
} else {
|
||||
// Defaults should match TestProjectConfig, omitting nullable values.
|
||||
in.createEmptyCommit = true;
|
||||
|
||||
@@ -45,6 +45,8 @@ public @interface TestProjectInput {
|
||||
|
||||
InheritableBoolean requireChangeId() default InheritableBoolean.INHERIT;
|
||||
|
||||
InheritableBoolean rejectEmptyCommit() default InheritableBoolean.INHERIT;
|
||||
|
||||
// Fields specific to acceptance test behavior.
|
||||
|
||||
/** Username to use for initial clone, passed to {@link AccountCreator}. */
|
||||
|
||||
Reference in New Issue
Block a user