Subject: Re: [PATCH] Add --show-touched option to show "diff --git" line when contents are unchanged

From: Steven Grimm <[email-masked]>
Date: Tue, 07 Aug 2007 14:39:28 +0800

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