mirror of
https://github.com/git/git
synced 2024-10-03 23:29:36 +00:00
builtin-diff: turn recursive on when defaulting to --patch format.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
f3bc468212
commit
047fbe906b
|
@ -254,8 +254,10 @@ int cmd_diff(int argc, const char **argv, char **envp)
|
||||||
init_revisions(&rev);
|
init_revisions(&rev);
|
||||||
|
|
||||||
argc = setup_revisions(argc, argv, &rev, NULL);
|
argc = setup_revisions(argc, argv, &rev, NULL);
|
||||||
if (!rev.diffopt.output_format)
|
if (!rev.diffopt.output_format) {
|
||||||
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
|
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
|
||||||
|
diff_setup_done(&rev.diffopt);
|
||||||
|
}
|
||||||
|
|
||||||
/* Do we have --cached and not have a pending object, then
|
/* Do we have --cached and not have a pending object, then
|
||||||
* default to HEAD by hand. Eek.
|
* default to HEAD by hand. Eek.
|
||||||
|
|
Loading…
Reference in a new issue