summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-12 19:34:41 -0700
committerJunio C Hamano <junkio@cox.net>2006-08-12 19:34:41 -0700
commitf3c5b39567535a41a371aad8a6affbeea0d4c0b9 (patch)
treec83f5d4be58e296f3eb90a4be13782d48e5713ad /diff.c
parent647377c4c91064fc5001acddd5357467c0da6ef9 (diff)
parent5faf64cd28bf79f0c2939717d2ba117498717059 (diff)
downloadgit-f3c5b39567535a41a371aad8a6affbeea0d4c0b9.tar.gz
Merge branch 'th/diff-extra'
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index a8710cb9e2..8861b853e7 100644
--- a/diff.c
+++ b/diff.c
@@ -1679,6 +1679,19 @@ void diff_setup(struct diff_options *options)
int diff_setup_done(struct diff_options *options)
{
+ int count = 0;
+
+ if (options->output_format & DIFF_FORMAT_NAME)
+ count++;
+ if (options->output_format & DIFF_FORMAT_NAME_STATUS)
+ count++;
+ if (options->output_format & DIFF_FORMAT_CHECKDIFF)
+ count++;
+ if (options->output_format & DIFF_FORMAT_NO_OUTPUT)
+ count++;
+ if (count > 1)
+ die("--name-only, --name-status, --check and -s are mutually exclusive");
+
if (options->find_copies_harder)
options->detect_rename = DIFF_DETECT_COPY;