]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-patch.c
t0110: Chain together using &&
[cgit.git] / ui-patch.c
index 3086608539dd04ed6719950d1686be416cd45bf8..6ec89b4ccf3a8b448d4c006ca2b386661498b74c 100644 (file)
@@ -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);
 }