Re: git-diff on touched files: bug or feature?
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 2, 2007, 14:39 UTC
- Message-ID
- <Pine.LNX.4.64.0708021537490.14781@racer.site>
- In-Reply-To
- <vpqir7y15sr.fsf@bauges.imag.fr>
Hi,
On Thu, 2 Aug 2007, Matthieu Moy wrote:
Show 12 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > >> I fully agree that git should be optimized for the common case. But > >> even for the common case, I also find the feature strange. You didn't > >> answer that part of my message, but I still fail to see a rationale > >> for making "git-diff; git-status" different from "git-status; git-diff". > > > > For performance reasons, git always compares the files' stat information > > with that stored in the index. > > I know that, but how does it answer the part of my message that you > are citing?
You _acknowledge_ that git is optimized for performance! And therefore you should also acknowledge that you _throw that away_ if you let your index go out of sync.
Show 6 quoted lines
> > So when you do "git diff" and it tells you all those diff lines, while no > > file was really changed, it tells you "get your act together! You just > > _willfully_ slowed down git's performance". > > The question remains: why should someone running git-diff get this, > and someone running git-status not get this?
Because git-status is an index-updating operation. That's why.
Ciao, Dscho