--name-only, --name-status, --check and -s are mutually exclusive
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Timo Hirvonen committed
Jun 24, 2006 at 20:26 UTC
d7de00f7e0d2374cb7933d2ee1ebe5273a8acf53
1 file changed
+13
diff.c
+13
@@ -1433,6 +1433,19 @@ void diff_setup(struct diff_options *options)
1433
1434
int diff_setup_done(struct diff_options *options)
1435
{
1436
+ int count = 0;
1437
+
1438
+ if (options->output_format & DIFF_FORMAT_NAME)
1439
+ count++;
1440
+ if (options->output_format & DIFF_FORMAT_NAME_STATUS)
1441
+ count++;
1442
+ if (options->output_format & DIFF_FORMAT_CHECKDIFF)
1443
+ count++;
1444
+ if (options->output_format & DIFF_FORMAT_NO_OUTPUT)
1445
+ count++;
1446
+ if (count > 1)
1447
+ die("--name-only, --name-status, --check and -s are mutually exclusive");
1448
+
1449
if ((options->find_copies_harder &&
1450
options->detect_rename != DIFF_DETECT_COPY) ||
1451
(0 <= options->rename_limit && !options->detect_rename))