Subject: Re: [PATCH] diff: resurrect the traditional empty "diff --git" behaviour

From: Steven Grimm <[email-masked]>
Date: Fri, 31 Aug 2007 15:37:56 -0700

Junio C Hamano wrote:
> This commit reinstates the traditional behaviour as the default,
> but with a twist.
>
> If you set diff.autorefreshindex configuration variable, it
> squelches the empty "diff --git" output, and at the end of the
> command, it automatically runs "update-index --refresh" without
> even bothering the user.  In other words, with the configuration
> variable set, people who do not care about the cache-dirtyness
> do not even have to see the warning.
>   

As the person who submitted the patch you're reversing with this, I 
agree 100% this is the better approach. Having the system self-heal is 
far preferable to requiring user action.

I would vote for reversing the sense of that config variable, actually: 
my guess is that most users, especially new ones who won't necessarily 
know about the config variable, would rather have git just keep itself 
healthy without user intervention. Having to manually update the index 
is (by virtue of requiring you to run a command that you wouldn't 
otherwise need to run) a mode more suited to advanced / experienced 
users, who are more likely to already be comfortable with the idea of 
flipping config switches. Making the more novice-friendly mode require 
that you know how to set a particular configuration variable doesn't 
seem right to me.

-Steve