/* argv_array guarantees a trailing NULL entry. */
memcpy(nargv, argv.argv, sizeof(char *) * (argv.argc + 1));
/* argv_array guarantees a trailing NULL entry. */
memcpy(nargv, argv.argv, sizeof(char *) * (argv.argc + 1));
- result = write_archive(argv.argc, nargv, NULL, NULL, 0);
+ result = write_archive(argv.argc, nargv, NULL, the_repository, NULL, 0);
{ ".tar", "application/x-tar", write_tar_archive },
{ ".tar.gz", "application/x-gzip", write_tar_gzip_archive },
{ ".tar.bz2", "application/x-bzip2", write_tar_bzip2_archive },
{ ".tar", "application/x-tar", write_tar_archive },
{ ".tar.gz", "application/x-gzip", write_tar_gzip_archive },
{ ".tar.bz2", "application/x-bzip2", write_tar_bzip2_archive },
cgit_print_error_page(400, "Bad request",
"Not a commit reference: %s", hex);
return 1;
cgit_print_error_page(400, "Bad request",
"Not a commit reference: %s", hex);
return 1;
ctx.page.mimetype = xstrdup(format->mimetype);
ctx.page.filename = xstrdup(filename);
cgit_print_http_headers();
ctx.page.mimetype = xstrdup(format->mimetype);
ctx.page.filename = xstrdup(filename);
cgit_print_http_headers();
cgit_print_error_page(400, "Bad request",
"Unsupported snapshot format: %s", filename);
return;
cgit_print_error_page(400, "Bad request",
"Unsupported snapshot format: %s", filename);
return;