diff options
author | Junio C Hamano <junkio@cox.net> | 2006-04-10 17:36:53 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-04-10 19:44:18 -0700 |
commit | 86ff1d2012cc5e074d54c0823154019b99ca03f0 (patch) | |
tree | ff73d484a830d8f9ec7a90b8c64ecdf642ab7934 /combine-diff.c | |
parent | 944e3a88fe9fa767a9e0100661026992755ab917 (diff) | |
download | git-86ff1d2012cc5e074d54c0823154019b99ca03f0.tar.gz git-86ff1d2012cc5e074d54c0823154019b99ca03f0.tar.xz |
diff-* --patch-with-raw
This new flag outputs the diff-raw output and diff-patch output
at the same time. Requested by Cogito.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'combine-diff.c')
-rw-r--r-- | combine-diff.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/combine-diff.c b/combine-diff.c index eb0d757f4..011bb8db2 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -832,6 +832,7 @@ const char *diff_tree_combined_merge(const unsigned char *sha1, diffopts = *opt; diffopts.output_format = DIFF_FORMAT_NO_OUTPUT; + diffopts.with_raw = 0; diffopts.recursive = 1; /* count parents */ @@ -858,6 +859,16 @@ const char *diff_tree_combined_merge(const unsigned char *sha1, num_paths++; } if (num_paths) { + if (opt->with_raw) { + int saved_format = opt->output_format; + opt->output_format = DIFF_FORMAT_RAW; + for (p = paths; p; p = p->next) { + if (show_combined_diff(p, num_parent, dense, + header, opt)) + header = NULL; + } + opt->output_format = saved_format; + } for (p = paths; p; p = p->next) { if (show_combined_diff(p, num_parent, dense, header, opt)) |