From 0a798076b8d1a4a31bf2b24c564e2a99fd1c43a1 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 9 Feb 2006 15:23:06 -0800 Subject: combine-diff: move formatting logic to show_combined_diff() This way, diff-files can make use of it. Also implement the full suite of what diff_flush_raw() supports just for consistency. With this, 'diff-tree -c -r --name-status' would show what is expected. There is no way to get the historical output (useful for debugging and low-level Plumbing work) anymore, so tentatively it makes '-m' to mean "do not combine and show individual diffs with parents". diff-files matches diff-tree to produce raw output for -c. For textual combined diff, use -p -c. Signed-off-by: Junio C Hamano --- diff-files.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'diff-files.c') diff --git a/diff-files.c b/diff-files.c index d24d11c28d..7db5ce6407 100644 --- a/diff-files.c +++ b/diff-files.c @@ -88,9 +88,8 @@ int main(int argc, const char **argv) } argv++; argc--; } - if (combine_merges) { + if (dense_combined_merges) diff_options.output_format = DIFF_FORMAT_PATCH; - } /* Find the directory, and set up the pathspec */ pathspec = get_pathspec(prefix, argv + 1); @@ -166,7 +165,8 @@ int main(int argc, const char **argv) if (combine_merges && num_compare_stages == 2) { show_combined_diff(&combine.p, 2, dense_combined_merges, - NULL); + NULL, + &diff_options); free(combine.p.path); continue; } -- cgit v1.2.1