提交 6baf0484 编写于 作者: M Mark Wooding 提交者: Junio C Hamano

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: NMark Wooding <mdw@distorted.org.uk>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 e70c6b35
...@@ -726,7 +726,7 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent, ...@@ -726,7 +726,7 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
if (header) { if (header) {
shown_header++; shown_header++;
puts(header); printf("%s%c", header, opt->line_termination);
} }
printf("diff --%s ", dense ? "cc" : "combined"); printf("diff --%s ", dense ? "cc" : "combined");
if (quote_c_style(elem->path, NULL, NULL, 0)) 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,7 +799,7 @@ static void show_raw_diff(struct combine_diff_path *p, int num_parent, const cha
inter_name_termination = 0; inter_name_termination = 0;
if (header) if (header)
puts(header); printf("%s%c", header, line_termination);
for (i = 0; i < num_parent; i++) { for (i = 0; i < num_parent; i++) {
if (p->parent[i].mode) if (p->parent[i].mode)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册