Fix firing pending "..all.." events on startup The Destination.wouldPushRef() method is called on startup to see if a Destination is configured to be pushed to for a specific ref, if it is not configured to do so, then firing the pending update is skipped. Since the magic "..all.." ref will never match the configuration in replication.config, always match it since if replication is configured at all, then it should be matched. Bug: Issue 11745 Change-Id: I53bd527932e6aea9ddd465772925d601aa034bd3
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java index 47664d7..9204c40 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
@@ -614,6 +614,9 @@ if (!config.replicatePermissions() && RefNames.REFS_CONFIG.equals(ref)) { return false; } + if (PushOne.ALL_REFS.equals(ref)) { + return true; + } for (RefSpec s : config.getRemoteConfig().getPushRefSpecs()) { if (s.matchSource(ref)) { return true;