Re: [PATCH] Do not show empty diff in diff-cache uncached.
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- May 29, 2005, 18:53 UTC
- Message-ID
- <Pine.LNX.4.58.0505291151250.10545@ppc970.osdl.org>
- In-Reply-To
- <7vis13wth4.fsf_-_@assigned-by-dhcp.cox.net>
On Sat, 28 May 2005, Junio C Hamano wrote:
Show 8 quoted lines
> > Pre- "diff --git" built-in diff did not add any extended header > on its own, so it did not show anything for unmodified but > stat-dirty file from diff-cache command without --cached flag. > > Recent diff-cache produces "diff --git" header internally before > calling the "diff" command, which results in an empty diff for > such a file, cluttering the output. This patch fixes this.
I'm not sure I like this.
I actually _expect_ that "git-diff-files" will show files that don't match the index, even if they happen to have the exact content that the index points to. It's how I know whether the index is up-to-date or not.
The exact same thing is trye of git-diff-cache. If something isn't up-to-date in the cache, you should show it, since certain operations depend on the cache being updated.
Linus