Skip to content

Commit deb989b

Browse files
Linus TorvaldsJunio C Hamano
authored andcommitted
Fix "git diff a..b" breakage
The "--cc" implies "-p", but without the recursive part. Linus Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 4e783b4 commit deb989b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

diff-tree.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,15 @@ int main(int argc, const char **argv)
284284
}
285285
usage(diff_tree_usage);
286286
}
287-
if (diff_options.output_format == DIFF_FORMAT_PATCH)
288-
diff_options.recursive = 1;
289287

290288
if (combine_merges) {
291289
diff_options.output_format = DIFF_FORMAT_PATCH;
292290
ignore_merges = 0;
293291
}
294292

293+
if (diff_options.output_format == DIFF_FORMAT_PATCH)
294+
diff_options.recursive = 1;
295+
295296
diff_tree_setup_paths(get_pathspec(prefix, argv));
296297
diff_setup_done(&diff_options);
297298

0 commit comments

Comments
 (0)