*/
public static byte[] gitAdvertise(Project project, String service, Response response) throws IOException {
response.setContentType("application/x-" + service + "-advertisement");
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);