summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 08ddd4f)
raw | patch | inline | side by side (parent: 08ddd4f)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 18 Apr 2006 18:29:33 +0000 (11:29 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 18 Apr 2006 18:29:33 +0000 (11:29 -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-tree.c | patch | blob | history | |
diff.c | patch | blob | history | |
git.c | patch | blob | history |
diff --git a/diff-tree.c b/diff-tree.c
index 7015b06c7f13dd71b7b557bd1c903065add33714..d1c61c8515cd531f1304b2b3cd0dea6a975c26c2 100644 (file)
--- a/diff-tree.c
+++ b/diff-tree.c
if (opt->dense_combined_merges)
opt->diffopt.output_format = DIFF_FORMAT_PATCH;
- if (opt->diffopt.output_format == DIFF_FORMAT_PATCH)
- opt->diffopt.recursive = 1;
-
diff_tree_setup_paths(get_pathspec(prefix, argv), &opt->diffopt);
diff_setup_done(&opt->diffopt);
index b54bbfa627219b194333297829843e7200501ee4..3a1e6ce619baca3d209adf0c21fb8de197e7e0ac 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->with_stat))
+ 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) {
index 140ed1873d7b5e334452cc8f8ac75a0541e32b6c..5209b04de50b23c2410573dae285e156ed25f833 100644 (file)
--- a/git.c
+++ b/git.c
opt.ignore_merges = 0;
if (opt.dense_combined_merges)
opt.diffopt.output_format = DIFF_FORMAT_PATCH;
- if (opt.diffopt.output_format == DIFF_FORMAT_PATCH)
- opt.diffopt.recursive = 1;
if (!full_diff && rev.prune_data)
diff_tree_setup_paths(rev.prune_data, &opt.diffopt);
diff_setup_done(&opt.diffopt);