diff options
author | Timo Hirvonen <tihirvon@gmail.com> | 2006-06-24 20:26:49 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-01 22:26:00 -0700 |
commit | d7de00f7e0d2374cb7933d2ee1ebe5273a8acf53 (patch) | |
tree | a20cc9cd457c295ba7f13a83693f7324a17ced3d | |
parent | 047fbe906b375e8a3a7564ad0e4443f62dd528a2 (diff) | |
download | git-d7de00f7e0d2374cb7933d2ee1ebe5273a8acf53.tar.gz git-d7de00f7e0d2374cb7933d2ee1ebe5273a8acf53.tar.xz |
--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>
-rw-r--r-- | diff.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1433,6 +1433,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) || (0 <= options->rename_limit && !options->detect_rename)) |