summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-04-18 13:18:21 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-04-18 13:18:21 -0700
commit524765efa550ea43d9f5aeff6b3c12264f664189 (patch)
tree262ed7b725d128550850af834b2e2d174dcdd44a
parentMerge branch 'lt/logopt' into next (diff)
parentFix "git log --stat": make sure to set recursive with --stat. (diff)
downloadtgif-524765efa550ea43d9f5aeff6b3c12264f664189.tar.xz
Merge branch 'lt/logopt' into next
* lt/logopt: Fix "git log --stat": make sure to set recursive with --stat.
-rw-r--r--diff.c9
-rw-r--r--revision.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index b54bbfa627..d75e0178ff 100644
--- a/diff.c
+++ b/diff.c
@@ -1029,6 +1029,15 @@ int diff_setup_done(struct diff_options *options)
options->detect_rename != DIFF_DETECT_COPY) ||
(0 <= options->rename_limit && !options->detect_rename))
return -1;
+
+ /*
+ * These cases always need recursive; we do not drop caller-supplied
+ * recursive bits for other formats here.
+ */
+ if ((options->output_format == DIFF_FORMAT_PATCH) ||
+ (options->output_format == DIFF_FORMAT_DIFFSTAT))
+ options->recursive = 1;
+
if (options->detect_rename && options->rename_limit < 0)
options->rename_limit = diff_rename_limit_default;
if (options->setup & DIFF_SETUP_USE_CACHE) {
diff --git a/revision.c b/revision.c
index 2976497ebf..dbd54da5ba 100644
--- a/revision.c
+++ b/revision.c
@@ -791,8 +791,6 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
if (revs->dense_combined_merges)
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
}
- if (revs->diffopt.output_format == DIFF_FORMAT_PATCH)
- revs->diffopt.recursive = 1;
revs->diffopt.abbrev = revs->abbrev;
diff_setup_done(&revs->diffopt);