aboutsummaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-10-18 22:08:42 -0700
committerJunio C Hamano <junkio@cox.net>2006-10-18 22:08:42 -0700
commitf73a5e897609c895aa6c10f7a89428d1749d37ce (patch)
tree14d34586f6d57e47b60be3145ab3754d1ac94fdd /combine-diff.c
parent8719f93b5619a0df99cec6e919a260f01ab76184 (diff)
parent74e2abe5b70aadf06984472ba9aa9a29900040e6 (diff)
downloadgit-f73a5e897609c895aa6c10f7a89428d1749d37ce.tar.xz
Merge branch 'jc/diff-numstat'
* jc/diff-numstat: diff --numstat
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 46d9121baf..65c786807b 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -856,8 +856,10 @@ void diff_tree_combined(const unsigned char *sha1,
/* show stat against the first parent even
* when doing combined diff.
*/
- if (i == 0 && opt->output_format & DIFF_FORMAT_DIFFSTAT)
- diffopts.output_format = DIFF_FORMAT_DIFFSTAT;
+ int stat_opt = (opt->output_format &
+ (DIFF_FORMAT_NUMSTAT|DIFF_FORMAT_DIFFSTAT));
+ if (i == 0 && stat_opt)
+ diffopts.output_format = stat_opt;
else
diffopts.output_format = DIFF_FORMAT_NO_OUTPUT;
diff_tree_sha1(parent[i], sha1, "", &diffopts);
@@ -887,7 +889,8 @@ void diff_tree_combined(const unsigned char *sha1,
}
needsep = 1;
}
- else if (opt->output_format & DIFF_FORMAT_DIFFSTAT)
+ else if (opt->output_format &
+ (DIFF_FORMAT_NUMSTAT|DIFF_FORMAT_DIFFSTAT))
needsep = 1;
if (opt->output_format & DIFF_FORMAT_PATCH) {
if (needsep)