Re: [PATCH] docs: clarify git diff modes of operation
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Nov 4, 2010, 21:50 UTC
- Message-ID
- <20101104215056.GA18475@burratino>
- In-Reply-To
- <20101104211729.GA5551@sigill.intra.peff.net>
Jeff King wrote:
> Jonathan, does this look ok based on our earlier discussion?
Yep, it's way better than the current state.
The list of operation modes still seems wrong: in addition to the meaning of
git diff --cached
from an unborn branch not fitting the model of implicit HEAD as mentioned before, there is also
git diff
not meaning the same thing as
git diff HEAD
. So I guess technically the separate operation modes are
git diff [--cached] git diff [--cached] <tree> git diff <tree> <tree> git diff --no-index <path> <path> git diff <blob> <blob>
where --cached means "use the version of the work tree stored in the index in place of the real thing".