Merge branch 'stable-3.2'

* stable-3.2:
  Receive: Only attempt to create UpdateGroupsRequest for patch-set refs
  Upgrade auto-value to 1.7.3

Change-Id: I266533f4dddc5eac124300145fafbf063310163d
This commit is contained in:
David Pursehouse
2020-06-24 09:40:34 +09:00
2 changed files with 9 additions and 8 deletions

View File

@@ -2144,9 +2144,10 @@ class ReceiveCommits {
// A's group.
// C) Commit is a PatchSet of a pre-existing change uploaded with a
// different target branch.
for (Ref ref : existingRefs) {
updateGroups.add(new UpdateGroupsRequest(ref, c));
}
existingRefs.stream()
.map(r -> PatchSet.Id.fromRef(r.getName()))
.filter(Objects::nonNull)
.forEach(i -> updateGroups.add(new UpdateGroupsRequest(i, c)));
if (!(newChangeForAllNotInTarget || magicBranch.base != null)) {
continue;
}
@@ -3019,8 +3020,8 @@ class ReceiveCommits {
final RevCommit commit;
List<String> groups = ImmutableList.of();
UpdateGroupsRequest(Ref ref, RevCommit commit) {
this.psId = requireNonNull(PatchSet.Id.fromRef(ref.getName()));
UpdateGroupsRequest(PatchSet.Id psId, RevCommit commit) {
this.psId = psId;
this.commit = commit;
}