+ if (raw) {
+ struct diff_options diffopt;
+
+ diff_setup(&diffopt);
+ diffopt.output_format = DIFF_FORMAT_PATCH;
+ diffopt.flags.recursive = 1;
+ diff_setup_done(&diffopt);
+
+ ctx.page.mimetype = "text/plain";
+ cgit_print_http_headers();
+ if (old_tree_oid) {
+ diff_tree_oid(old_tree_oid, new_tree_oid, "",
+ &diffopt);
+ } else {
+ diff_root_tree_oid(new_tree_oid, "", &diffopt);
+ }
+ diffcore_std(&diffopt);
+ diff_flush(&diffopt);
+
+ return;
+ }
+
+ difftype = ctx.qry.has_difftype ? ctx.qry.difftype : ctx.cfg.difftype;
+ use_ssdiff = difftype == DIFF_SSDIFF;
+
+ if (show_ctrls) {
+ cgit_print_layout_start();