summaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
authorMark Wooding <mdw@distorted.org.uk>2006-02-27 12:52:52 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-02-27 19:01:22 (GMT)
commit6baf0484efcd29bb5e58ccd5ea0379481d4a83f4 (patch)
tree7b6b37e00cdf9648787046a4b1d620fb3dd04949 /combine-diff.c
parente70c6b35749c316f6e97099bd6bdac895c9d6f68 (diff)
downloadgit-6baf0484efcd29bb5e58ccd5ea0379481d4a83f4.zip
git-6baf0484efcd29bb5e58ccd5ea0379481d4a83f4.tar.gz
git-6baf0484efcd29bb5e58ccd5ea0379481d4a83f4.tar.bz2
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>
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 984103e..a23894d 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -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))
@@ -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)