Thread (5 messages) flat view 5 messages, 5 authors, 2016-06-15

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

From: Steven Grimm <hidden>
Date: 2016-06-15 22:43:32

Possibly related (same subject, not in this thread)

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help