struct strbuf indent = STRBUF_INIT;
memcpy(&opts, diffopt, sizeof(opts));
- opts.output_format = DIFF_FORMAT_PATCH;
+ if (!opts.output_format)
+ opts.output_format = DIFF_FORMAT_PATCH;
opts.flags.suppress_diff_headers = 1;
opts.flags.dual_color_diffed_diffs = dual_color;
opts.output_prefix = output_prefix_cb;