aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-05-22 00:33:34 -0700
committerJunio C Hamano <junkio@cox.net>2006-05-22 00:33:34 -0700
commitb05b52027c0e43abc9629049944283729a07899f (patch)
tree0720a55ceb41729702f2a75c40dc3bce7dacbe20
parent7b8e4ab07c6ebc72e311804c9c79ef93cfbbe704 (diff)
parent5e363541d0431b640e4bbbafb2941d1c64fa13c4 (diff)
downloadgit-b05b52027c0e43abc9629049944283729a07899f.tar.gz
git-b05b52027c0e43abc9629049944283729a07899f.tar.xz
Merge branch 'master' into next
* master: diff: minor option combination fix.
-rw-r--r--diff.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index d8c00dbc4..7f35e595c 100644
--- a/diff.c
+++ b/diff.c
@@ -1304,6 +1304,14 @@ int diff_setup_done(struct diff_options *options)
(options->output_format == DIFF_FORMAT_CHECKDIFF))
options->recursive = 1;
+ /*
+ * These combinations do not make sense.
+ */
+ if (options->output_format == DIFF_FORMAT_RAW)
+ options->with_raw = 0;
+ if (options->output_format == DIFF_FORMAT_DIFFSTAT)
+ options->with_stat = 0;
+
if (options->detect_rename && options->rename_limit < 0)
options->rename_limit = diff_rename_limit_default;
if (options->setup & DIFF_SETUP_USE_CACHE) {