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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux