aboutsummaryrefslogtreecommitdiff
path: root/builtin-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-07-01 22:15:40 -0700
committerJunio C Hamano <junkio@cox.net>2006-07-01 22:15:40 -0700
commit047fbe906b375e8a3a7564ad0e4443f62dd528a2 (patch)
tree24fc975209d56b61eb8a9540d506e60e00a17d8b /builtin-diff.c
parentf3bc46821263cfc2ab41b561727da4592ae5ea3b (diff)
downloadgit-047fbe906b375e8a3a7564ad0e4443f62dd528a2.tar.gz
git-047fbe906b375e8a3a7564ad0e4443f62dd528a2.tar.xz
builtin-diff: turn recursive on when defaulting to --patch format.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-diff.c')
-rw-r--r--builtin-diff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-diff.c b/builtin-diff.c
index 47e0a37e2..d520c7ca2 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -254,8 +254,10 @@ int cmd_diff(int argc, const char **argv, char **envp)
init_revisions(&rev);
argc = setup_revisions(argc, argv, &rev, NULL);
- if (!rev.diffopt.output_format)
+ if (!rev.diffopt.output_format) {
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
+ diff_setup_done(&rev.diffopt);
+ }
/* Do we have --cached and not have a pending object, then
* default to HEAD by hand. Eek.