use of org.eclipse.jgit.transport.AdvertiseRefsHook in project gerrit by GerritCodeReview.
the class RefAdvertisementIT method getReceivePackRefs.
private TestRefAdvertiser.Result getReceivePackRefs() throws Exception {
try (Repository repo = repoManager.openRepository(project)) {
AdvertiseRefsHook adv = ReceiveCommitsAdvertiseRefsHookChain.createForTest(queryProvider, project, identifiedUserFactory.create(admin.id()));
ReceivePack rp = new ReceivePack(repo);
rp.setAdvertiseRefsHook(adv);
TestRefAdvertiser advertiser = new TestRefAdvertiser(repo);
rp.sendAdvertisedRefs(advertiser);
return advertiser.result();
}
}
Aggregations