Skip to content

Commit

Permalink
builtin-diff: turn recursive on when defaulting to --patch format.
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Jul 2, 2006
1 parent f3bc468 commit 047fbe9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion builtin-diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 047fbe9

Please sign in to comment.