Re: 'git diff' against files outside a git repo
- From
Avery Pennarun <apenwarr@gmail.com>
- Date
- Sep 26, 2010, 09:38 UTC
- Message-ID
- <AANLkTikJ-SN5xmwqhEHcESfQCWvGjSHp3OK1Hi4+0jBL@mail.gmail.com>
- In-Reply-To
- <7vwrq9m0y0.fsf@alter.siamese.dyndns.org>
On Sun, Sep 26, 2010 at 12:13 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
> Avery Pennarun <apenwarr@gmail.com> writes: > >> Oddly, 'git diff file1 file2' *doesn't* work when file1 and file2 are >> in a working tree; git tries to diff something, apparently, but I >> don't know what. > > Heh, I thought you've been using git long enough that you sh/would know > that you are comparing the index and the working tree, using "file1" and > "file2" as pathspecs.
Ha, of course. And I do that all the time, so it's silly that I somehow forgot for the duration of that email.
The real surprise was that this *wasn't* the meaning when I was outside a git tree :)
Have fun,
Avery