Re: [PATCH] Add --show-touched option to show "diff --git" line when contents are unchanged
- From
Steven Grimm <koreth@midwinter.com>
- Date
- Aug 7, 2007, 06:39 UTC
- Message-ID
- <46B813A0.4040305@midwinter.com>
- In-Reply-To
- <alpine.LFD.0.999.0708062118190.5037@woody.linux-foundation.org>
Linus Torvalds wrote:
> Doing a "git diff" cannot actually update the index (since it very much > has to work on a read-only setup too), which is why the index _stays_ > stale unless something is done (eg "git status") to refresh it.
Another thought: How about if git-diff *tries* to update the index if needed, but failure to do so is not treated as an error condition? That seems like the best of both worlds to me: git would self-correct a potential performance problem without user intervention, while still working properly in a read-only environment.
-Steve