X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=combine-diff.c;h=9bd27f82ec1d7c313987325a4948a5eed8c9b799;hb=ece634d1478a9f1bf19eed8a6b7dee305fadd46e;hp=e519583650c16ab4077c834f409658c63b6d5a06;hpb=8bc7574b6332ef45645c6e0917e9d59919b277ef;p=git.git diff --git a/combine-diff.c b/combine-diff.c index e5195836..9bd27f82 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -843,6 +843,7 @@ const char *diff_tree_combined_merge(const unsigned char *sha1, diffopts = *opt; diffopts.output_format = DIFF_FORMAT_NO_OUTPUT; + diffopts.with_raw = 0; diffopts.recursive = 1; /* count parents */ @@ -869,6 +870,17 @@ const char *diff_tree_combined_merge(const unsigned char *sha1, num_paths++; } if (num_paths) { + if (opt->with_raw) { + int saved_format = opt->output_format; + opt->output_format = DIFF_FORMAT_RAW; + for (p = paths; p; p = p->next) { + if (show_combined_diff(p, num_parent, dense, + header, opt)) + header = NULL; + } + opt->output_format = saved_format; + putchar(opt->line_termination); + } for (p = paths; p; p = p->next) { if (show_combined_diff(p, num_parent, dense, header, opt))