Merge "ReceiveCommits: Fix set comparison to avoid no-op group updates"
This commit is contained in:
		| @@ -2448,7 +2448,7 @@ public class ReceiveCommits { | ||||
|               if (groups == null) { | ||||
|                 return false; | ||||
|               } | ||||
|             } else if (Sets.newHashSet(oldGroups).equals(groups)) { | ||||
|             } else if (sameGroups(oldGroups, groups)) { | ||||
|               return false; | ||||
|             } | ||||
|             psUtil.setGroups(ctx.getDb(), ctx.getUpdate(psId), ps, groups); | ||||
| @@ -2459,6 +2459,10 @@ public class ReceiveCommits { | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     private boolean sameGroups(List<String> a, List<String> b) { | ||||
|       return Sets.newHashSet(a).equals(Sets.newHashSet(b)); | ||||
|     } | ||||
|  | ||||
|     CheckedFuture<Void, RestApiException> updateGroups() { | ||||
|       final Thread caller = Thread.currentThread(); | ||||
|       ListenableFuture<Void> future = changeUpdateExector.submit( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dave Borowitz
					Dave Borowitz