Re: [ALTERNATIVE PATCH] diff file1 file2: do not default to --no-index inside a git repository
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 24, 2008, 07:25 UTC
- Message-ID
- <7vskw8madq.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.DEB.1.00.0805232349410.30431@racer>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 8 quoted lines
> When calling "diff -- a b" where a exists in the index, but b does not, > do not default to --no-index inside a git repository. > > For example, > > git mv a b && git diff a b > > would not have the expected result.
I think the rule should be much stricter and "git diff" should _not_ use no-index if run in a repository without --no-index.
I also suspect that your updates to the testsuite are grossly inadequate. Earlier "diff expect actual" was replaced with "git diff expect actual" against my good taste (TM) in many tests, and they need to either be replaced with "git diff --no-index" or (even better) "test_cmp".
No need to resend, as I did a rather unpleasant conversion of these places back to "test_cmp" already, but I'd appreciate an extra set of eyeballs to proofread that rather large fix to the testsuite.