X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/840858594e8b48560541792b717a71dd802d5d80..e14eee9ea573a17c9501d1020fc869218aac9e8a:/ui-patch.c diff --git a/ui-patch.c b/ui-patch.c index 333bb99..6ec89b4 100644 --- a/ui-patch.c +++ b/ui-patch.c @@ -1,6 +1,6 @@ /* ui-patch.c: generate patch view * - * Copyright (C) 2007 Lars Hjemli + * Copyright (C) 2006-2014 cgit Development Team * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -59,7 +59,7 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, patchname = fmt("%s.patch", rev_range); ctx.page.mimetype = "text/plain"; ctx.page.filename = patchname; - cgit_print_http_headers(&ctx); + cgit_print_http_headers(); if (ctx.cfg.noplainemail) { rev_argv[2] = "--format=format:From %H Mon Sep 17 00:00:00 " @@ -73,7 +73,8 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, rev.diff = 1; rev.show_root_diff = 1; rev.max_parents = 1; - rev.diffopt.output_format |= DIFF_FORMAT_PATCH; + rev.diffopt.output_format |= DIFF_FORMAT_DIFFSTAT | + DIFF_FORMAT_PATCH | DIFF_FORMAT_SUMMARY; setup_revisions(ARRAY_SIZE(rev_argv), (const char **)rev_argv, &rev, NULL); prepare_revision_walk(&rev); @@ -82,4 +83,6 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, log_tree_commit(&rev, commit); printf("-- \ncgit %s\n\n", cgit_version); } + + fflush(stdout); }