From: Junio C Hamano Date: Sun, 13 Aug 2006 02:34:41 +0000 (-0700) Subject: Merge branch 'th/diff-extra' X-Git-Tag: v1.4.3-rc1~269 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f3c5b39567535a41a371aad8a6affbeea0d4c0b9;p=git.git Merge branch 'th/diff-extra' --- f3c5b39567535a41a371aad8a6affbeea0d4c0b9 diff --cc diff.c index a8710cb9e,5358fd0c1..8861b853e --- a/diff.c +++ b/diff.c @@@ -1679,8 -1433,23 +1679,21 @@@ void diff_setup(struct diff_options *op 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)) - return -1; + if (options->find_copies_harder) + options->detect_rename = DIFF_DETECT_COPY; if (options->output_format & (DIFF_FORMAT_NAME | DIFF_FORMAT_NAME_STATUS |