Use ReceiveCommitsAdvertiseRefsHook in a chain

Replaces the manual chaining with the included facility in JGit.

Change-Id: I093fbae9fe87b8e214f25f133078c6e26509f887
This commit is contained in:
Dave Borowitz
2012-02-14 15:04:47 -08:00
parent 18ef234146
commit 2a2d8b9fea
2 changed files with 6 additions and 8 deletions

View File

@@ -17,7 +17,6 @@ package com.google.gerrit.server.git;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.transport.AdvertiseRefsHook;
import org.eclipse.jgit.transport.ReceivePack;
import org.eclipse.jgit.transport.ServiceMayNotContinueException;
import org.eclipse.jgit.transport.UploadPack;
import java.util.HashMap;
@@ -25,12 +24,6 @@ import java.util.Map;
/** Exposes only the non refs/changes/ reference names. */
public class ReceiveCommitsAdvertiseRefsHook implements AdvertiseRefsHook {
private final AdvertiseRefsHook base;
public ReceiveCommitsAdvertiseRefsHook(AdvertiseRefsHook base) {
this.base = base != null ? base : AdvertiseRefsHook.DEFAULT;
}
@Override
public void advertiseRefs(UploadPack us) {
throw new UnsupportedOperationException(