public void AdvertiseUploadPack(Stream output) { using (var repository = GetRepository()) { var pack = new UploadPack(repository); pack.sendAdvertisedRefs(new RefAdvertiser.PacketLineOutRefAdvertiser(new PacketLineOut(output))); } }
public static void AdvertiseUploadPack(string path, Stream output) { var repositoryPath = RepositoryPath.Resolve(path); var repository = Directory.Exists(path) ? new Repository(repositoryPath.AbsoluteRootPath) : Repository.Init(repositoryPath.AbsoluteRootPath); using (repository) { var pack = new UploadPack(repository); pack.sendAdvertisedRefs( new RefAdvertiser.PacketLineOutRefAdvertiser( new PacketLineOut(output))); } }