Skip to content

Commit

Permalink
combine-diff: Honour -z option correctly.
Browse files Browse the repository at this point in the history
Combined diffs don't null terminate things in the same way as standard
diffs.  This is presumably wrong.

Signed-off-by: Mark Wooding <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
(cherry picked from 6baf048 commit)
  • Loading branch information
distorted-mdw authored and Junio C Hamano committed Mar 1, 2006
1 parent b9003c0 commit feffadd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions combine-diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent,

if (header) {
shown_header++;
puts(header);
printf("%s%c", header, opt->line_termination);
}
printf("diff --%s ", dense ? "cc" : "combined");
if (quote_c_style(elem->path, NULL, NULL, 0))
Expand Down Expand Up @@ -799,7 +799,7 @@ static void show_raw_diff(struct combine_diff_path *p, int num_parent, const cha
inter_name_termination = 0;

if (header)
puts(header);
printf("%s%c", header, line_termination);

for (i = 0; i < num_parent; i++) {
if (p->parent[i].mode)
Expand Down

0 comments on commit feffadd

Please sign in to comment.