aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-04-11 11:52:01 -0700
committerJunio C Hamano <junkio@cox.net>2006-04-11 11:52:01 -0700
commit55275b3812af3fe84516f176e589100232aef4f5 (patch)
treee6e31d8f35ccb7119737bf14c9621db12fad7d1d
parent8fcd4218c63d15481d8fbb12c3fddfffa98e1adc (diff)
parent90c1b08c7dc5be890e697237f67a188da235ffc8 (diff)
downloadgit-55275b3812af3fe84516f176e589100232aef4f5.tar.gz
git-55275b3812af3fe84516f176e589100232aef4f5.tar.xz
Merge branch 'jc/withraw' into next
* jc/withraw: Separate the raw diff and patch with a newline Document --patch-with-raw
-rw-r--r--Documentation/diff-options.txt3
-rw-r--r--combine-diff.c1
-rw-r--r--diff.c1
-rw-r--r--diff.h2
4 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index ec6811c71..338014c81 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -4,6 +4,9 @@
-u::
Synonym for "-p".
+--patch-with-raw::
+ Generate patch but keep also the default raw diff output.
+
-z::
\0 line termination on output
diff --git a/combine-diff.c b/combine-diff.c
index 011bb8db2..5f6048b39 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -868,6 +868,7 @@ const char *diff_tree_combined_merge(const unsigned char *sha1,
header = NULL;
}
opt->output_format = saved_format;
+ putchar(opt->line_termination);
}
for (p = paths; p; p = p->next) {
if (show_combined_diff(p, num_parent, dense,
diff --git a/diff.c b/diff.c
index 99d76d01e..a14e6644c 100644
--- a/diff.c
+++ b/diff.c
@@ -1322,6 +1322,7 @@ void diff_flush(struct diff_options *options)
struct diff_filepair *p = q->queue[i];
flush_one_pair(p, DIFF_FORMAT_RAW, options);
}
+ putchar(options->line_termination);
}
for (i = 0; i < q->nr; i++) {
struct diff_filepair *p = q->queue[i];
diff --git a/diff.h b/diff.h
index 07b153b56..c5372b984 100644
--- a/diff.h
+++ b/diff.h
@@ -113,6 +113,8 @@ extern void diffcore_std_no_resolve(struct diff_options *);
" -z output diff-raw with lines terminated with NUL.\n" \
" -p output patch format.\n" \
" -u synonym for -p.\n" \
+" --patch-with-raw\n" \
+" output both a patch and the diff-raw format.\n" \
" --name-only show only names of changed files.\n" \
" --name-status show names and status of changed files.\n" \
" --full-index show full object name on index lines.\n" \