]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-patch.c
Add struct cgit_page to cgit_context
[ps-cgit] / ui-patch.c
index d93426b01b9c420697162de3abef710d6a02d2d1..a77f3f6cccc67ea85029eba247c61f8470303fa5 100644 (file)
@@ -92,7 +92,9 @@ void cgit_print_patch(char *hex, struct cacheitem *item)
        hashcpy(old_sha1, commit->parents->item->object.sha1);
 
        patchname = fmt("%s.patch", sha1_to_hex(sha1));
        hashcpy(old_sha1, commit->parents->item->object.sha1);
 
        patchname = fmt("%s.patch", sha1_to_hex(sha1));
-       cgit_print_snapshot_start("text/plain", patchname, item);
+       ctx.page.mimetype = "text/plain";
+       ctx.page.filename = patchname;
+       cgit_print_http_headers(&ctx);
        htmlf("From %s Mon Sep 17 00:00:00 2001\n", sha1_to_hex(sha1));
        htmlf("From: %s%s\n", info->author, info->author_email);
        html("Date: ");
        htmlf("From %s Mon Sep 17 00:00:00 2001\n", sha1_to_hex(sha1));
        htmlf("From: %s%s\n", info->author, info->author_email);
        html("Date: ");