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 <junkio@cox.net>
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user