Skip to content

Commit

Permalink
--name-only, --name-status, --check and -s are mutually exclusive
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Timo Hirvonen authored and Junio C Hamano committed Jul 2, 2006
1 parent 047fbe9 commit d7de00f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d7de00f

Please sign in to comment.