Skip to content

Commit

Permalink
Merge branch 'jc/withraw' into next
Browse files Browse the repository at this point in the history
* jc/withraw:
  Separate the raw diff and patch with a newline
  Document --patch-with-raw
  • Loading branch information
Junio C Hamano committed Apr 11, 2006
2 parents 8fcd421 + 90c1b08 commit 55275b3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Documentation/diff-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions combine-diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 2 additions & 0 deletions diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 55275b3

Please sign in to comment.