Use ReceiveCommitsAdvertiseRefsHook in a chain
Replaces the manual chaining with the included facility in JGit. Change-Id: I093fbae9fe87b8e214f25f133078c6e26509f887
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user