summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 965f803)
raw | patch | inline | side by side (parent: 965f803)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 18 Apr 2006 18:41:28 +0000 (11:41 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 18 Apr 2006 18:43:09 +0000 (11:43 -0700) |
Just like "patch" format always needs recursive, "diffstat"
format does not make sense without setting recursive.
Signed-off-by: Junio C Hamano <junkio@cox.net>
format does not make sense without setting recursive.
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff.c | patch | blob | history | |
revision.c | patch | blob | history |
index b54bbfa627219b194333297829843e7200501ee4..d75e0178ff395e2a24b7c42ea6e38faac2c93bbf 100644 (file)
--- a/diff.c
+++ b/diff.c
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 5abec18bc1ce161a2964dfa89f967ec7a0ec2fde..4d2a64ef6b3e0a8f9af30264c5e7f2dc8b56d148 100644 (file)
--- 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);