Re: [PATCH] grep: --full-tree
From: Uri Okrent <hidden>
Date: 2016-06-15 22:47:47
Felipe Contreras wrote:
On Thu, Nov 26, 2009 at 1:22 AM, Jeff King [off-list ref] wrote:quoted
Probably we would want something flexible, but with sane defaults. Like an environment variable to ignore all (or most) config options, but then the ability to opt into specific ones. Something like: GIT_PLUMBING=1; export GIT_PLUMBING git log ;# does not respect any non-plumbing config git --respect='log.showroot' ;# respect just the one variable git --respect='color.*' log ;# you get all color But there are two big obstacles (besides the obvious issue that introducing this in itself needs a gentle transition plan): 1. We need to annotate every config option with whether it is potentially problematic. For example, core.filemode should probably be respected no matter what (but I'm not sure if it is simply true for core.*). 2. Script writers need to actually use the system, which is somewhat more verbose and annoying than what they have to do now. But at least it defaults to safety when they are lazy, and then they can re-add options. Of course, they are stuck on an upgrade treadmill of analyzing and approving each new option that appears in git.+1 on this. This would make it easier to add options in the future that would be potentially dangerous to scripts otherwise. But more than "non-plumbing" I would rather define these variables as *preferences*; things that are not essential to the proper functioning of git commands, and would vary from user to user.
Sounds like a good idea to me, speaking as someone who has git support
scripts. Dealing with configuration soup in every script would be very
bad.
The same type of insulation though could probably be achieved by not
adding configuration options that alter the behavior of commands,
and instead have user's rely on aliases for that purpose. (The cat's
probably already out of the bag WRT to configuration though).
--
Uri
Please consider the environment before printing this message.
http://www.panda.org/how_you_can_help/