]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'th/diff-extra'
authorJunio C Hamano <junkio@cox.net>
Sun, 13 Aug 2006 02:34:41 +0000 (19:34 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 13 Aug 2006 02:34:41 +0000 (19:34 -0700)
1  2 
builtin-diff-files.c
builtin-diff.c
diff.c

Simple merge
diff --cc builtin-diff.c
Simple merge
diff --cc diff.c
index a8710cb9e2388ce915fabc99cb86caacd1020961,5358fd0c14a249c2d1a3fe417016264aba6fc745..8861b853e70ab511fdcab16d97687aafc99ec000
--- 1/diff.c
--- 2/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)
  {
 -      if ((options->find_copies_harder &&
 -           options->detect_rename != DIFF_DETECT_COPY) ||
 -          (0 <= options->rename_limit && !options->detect_rename))
 -              return -1;
+       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;
  
        if (options->output_format & (DIFF_FORMAT_NAME |
                                      DIFF_FORMAT_NAME_STATUS |