Add extension point to register JGit PostUploadHooks
Plugins may register PostUploadHook instances in order to get notified after JGit is done uploading a pack. Now that PostUploadHook can be registered using the DynamicSet, use that mechanism to register UploadPackMetricsHook. Change-Id: If848bddc85ca8923a5d55f7dd448ac218c910e1c
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
package com.google.gerrit.server.git;
|
||||
|
||||
import com.google.gerrit.extensions.config.FactoryModule;
|
||||
import com.google.gerrit.extensions.registration.DynamicSet;
|
||||
|
||||
import org.eclipse.jgit.transport.PostUploadHook;
|
||||
|
||||
/** Configures the Git support. */
|
||||
public class GitModule extends FactoryModule {
|
||||
@@ -24,5 +27,7 @@ public class GitModule extends FactoryModule {
|
||||
factory(MetaDataUpdate.InternalFactory.class);
|
||||
bind(MetaDataUpdate.Server.class);
|
||||
bind(ReceiveConfig.class);
|
||||
DynamicSet.bind(binder(), PostUploadHook.class)
|
||||
.to(UploadPackMetricsHook.class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user