Merge "ChangeRebuilderImpl: Omit empty group list from update"

This commit is contained in:
Edwin Kempin
2016-04-12 06:29:35 +00:00
committed by Gerrit Code Review
2 changed files with 26 additions and 1 deletions

View File

@@ -560,7 +560,10 @@ public class ChangeRebuilderImpl extends ChangeRebuilder {
update.setSubjectForCommit("Create patch set " + ps.getPatchSetId());
}
setRevision(update, ps);
update.setGroups(ps.getGroups());
List<String> groups = ps.getGroups();
if (!groups.isEmpty()) {
update.setGroups(ps.getGroups());
}
if (ps.isDraft()) {
update.setPatchSetState(PatchSetState.DRAFT);
}