diff options
Diffstat (limited to 'builtin-diff.c')
-rw-r--r-- | builtin-diff.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-diff.c b/builtin-diff.c index 91235a118a..47e0a37e21 100644 --- a/builtin-diff.c +++ b/builtin-diff.c @@ -252,9 +252,11 @@ int cmd_diff(int argc, const char **argv, char **envp) git_config(git_diff_config); init_revisions(&rev); - rev.diffopt.output_format = DIFF_FORMAT_PATCH; argc = setup_revisions(argc, argv, &rev, NULL); + if (!rev.diffopt.output_format) + rev.diffopt.output_format = DIFF_FORMAT_PATCH; + /* Do we have --cached and not have a pending object, then * default to HEAD by hand. Eek. */ |