On Sun, Jan 25, 2009 at 06:30:18PM -0800, Junio C Hamano wrote: > It would be a good addition to our toolset if scripts like gitk can > declare which options and features are safe to accept from the end user to > pass down to the plumbing tools. "git rev-parse", which lets the script > sift between options that are meant to affect ancestry traversal and the > ones that are for other (primarily diff family) commands, does not do > anything fancy like that, but it would be a logical place to do this sort > of thing. I'm not sure there is a good way of doing this at a less fine-grained level than "each option". That is, how can git-core, without knowing how the script will use the output, classify options in groups according to how the script will react to them? It seems like "--since" is innocent enough for gitk. It just limits the commits shown. So maybe it goes into the "ancestry traversal" list. But is that whole list safe? "--reverse" isn't, but I would have put it in the same list. So I think what you will end up with is a list in gitk of "these particular options are known good for passing through". And that doesn't really need tool support from git-core. It's up to each script how much it wants to protect the user. But if you are proposing that some config options can be "enabled" by scripts selectively, then I think that does need tool support. Keith's "primer" example will be parsed by git, not by whatever script is calling it. So we would need to feed it some list of "these are the OK options". -Peff -- 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