@matheusbsbs / matheus-bagliano / commits / feffaddce0
Fork 0

combine-diff: Honour -z option correctly.

Combined diffs don't null terminate things in the same way as standard diffs. This is presumably wrong. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from 6baf0484efcd29bb5e58ccd5ea0379481d4a83f4 commit)

Mark Wooding committed Feb 27, 2006 at 12:52 UTC feffaddce0cec7fd3f749d23e95579b683961002
1 file changed +2 -2
combine-diff.c
+2 -2
@@ -726,7 +726,7 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
726
727 if (header) {
728 shown_header++;
729 - puts(header);
729 + printf("%s%c", header, opt->line_termination);
730 }
731 printf("diff --%s ", dense ? "cc" : "combined");
732 if (quote_c_style(elem->path, NULL, NULL, 0))
@@ -799,7 +799,7 @@ static void show_raw_diff(struct combine_diff_path *p, int num_parent, const cha
799 inter_name_termination = 0;
800
801 if (header)
802 - puts(header);
802 + printf("%s%c", header, line_termination);
803
804 for (i = 0; i < num_parent; i++) {
805 if (p->parent[i].mode)