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

From: Matthieu Moy <[email-masked]>
Date: Tue, 07 Aug 2007 08:47:52 +0200

Linus Torvalds <[email-masked]> writes:

> It's not that the old output is "useful" in itself, but it's important for 
> people to know that the index is clean. So I'd suggest just setting a flag 
> when the header isn't printed, and then printing out a single line at the 
> end about "git index not up-to-date" or something.

Yes. Junio's patch has this as a comment, it's probably good to
uncomment it, and perhaps print it directly on stdout so that you see
it even with a pager.

> Doing a "git diff" cannot actually update the index (since it very much 
> has to work on a read-only setup too),

Err, what's the relationship between the two parts of your sentence?
You can't be sure that git-diff will update the index (because you may
be working on a read-only setup, yes), but git-diff can at least _try_
to, and fall-back to the read-only behavior if updating the index
fails.

That's not a highly original idea since this is what git already does
with "status".

Once more, I'm willing to write the code for that if it has a chance
to be accepted.

-- 
Matthieu