AdvertiseRefsHook
public abstract class AbstractAdvertiseRefsHook extends Object implements AdvertiseRefsHook
AdvertiseRefsHook
that advertises the same refs for
upload-pack and receive-pack.DEFAULT
Constructor | Description |
---|---|
AbstractAdvertiseRefsHook() |
Modifier and Type | Method | Description |
---|---|---|
void |
advertiseRefs(BaseReceivePack receivePack) |
Advertise refs for receive-pack.
|
void |
advertiseRefs(UploadPack uploadPack) |
Advertise refs for upload-pack.
|
protected Set<ObjectId> |
getAdvertisedHaves(Repository repository,
RevWalk revWalk) |
Get the additional haves to advertise.
|
protected abstract Map<String,Ref> |
getAdvertisedRefs(Repository repository,
RevWalk revWalk) |
Get the refs to advertise.
|
public void advertiseRefs(UploadPack uploadPack) throws ServiceMayNotContinueException
AdvertiseRefsHook
advertiseRefs
in interface AdvertiseRefsHook
uploadPack
- instance on which to call
UploadPack.setAdvertisedRefs(java.util.Map)
if necessary.ServiceMayNotContinueException
- abort; the message will be sent to the user.public void advertiseRefs(BaseReceivePack receivePack) throws ServiceMayNotContinueException
AdvertiseRefsHook
advertiseRefs
in interface AdvertiseRefsHook
receivePack
- instance on which to call
BaseReceivePack.setAdvertisedRefs(java.util.Map,java.util.Set)
if necessary.ServiceMayNotContinueException
- abort; the message will be sent to the user.protected abstract Map<String,Ref> getAdvertisedRefs(Repository repository, RevWalk revWalk) throws ServiceMayNotContinueException
repository
- repository instance.revWalk
- open rev walk on the repository.ServiceMayNotContinueException
- abort; the message will be sent to the user.protected Set<ObjectId> getAdvertisedHaves(Repository repository, RevWalk revWalk) throws ServiceMayNotContinueException
repository
- repository instance.revWalk
- open rev walk on the repository.BaseReceivePack.getAdvertisedObjects()
.ServiceMayNotContinueException
- abort; the message will be sent to the user.Copyright © 2018. All rights reserved.