Subject: Re: [PATCH] git-diff: Add --staged as a synonym for --cached.

From: Junio C Hamano <[email-masked]>
Date: Wed, 12 Nov 2008 15:42:00 -0800

"Avery Pennarun" <[email-masked]> writes:

> I assume the reason is that "git diff tree1..tree2" works with the
> differences between tree1 and tree2, much like "git log tree1..tree2"
> does.

Actually, that perception is already confused.  The analogue to "log A..B"
is expressed as "diff A...B", and not "diff A..B".

That is one of the reasons why I tend to teach against using "diff A..B"
unless you know what it is doing. I'd suggest to get out of that habit
before you confuse yourself even more ;-).

The _only_ reason diff takes A..B and A...B syntax is because the command
line parameter parser was easy to write that way.  IOW, it was an artifact
of the implementation convenience.