ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
PacketLineOut packetLineOut = new PacketLineOut(byteArrayOutputStream);
packetLineOut.writeString("# service=" + service + "\n");
packetLineOut.end();
PacketLineOutRefAdvertiser packetLineOutRefAdvertiser = new PacketLineOutRefAdvertiser(packetLineOut);
if (service.equals("git-upload-pack")) {
Repository repository = GitRepository.buildGitRepository(project);
UploadPack uploadPack = new UploadPack(repository);
uploadPack.setBiDirectionalPipe(false);