On Sun, 25 Jan 2009, Jeff King wrote: > let's say I have a gitattributes file like this: > *.c diff=c > and my config says: > [diff] > opt1 = val1_default > opt2 = val2_default > [diff "c"] > opt1 = val1_c > > Now obviously if I want to use opt1 for my C files, it should be val1_c. > But if I want to use opt2, what should it use? There are two reasonable > choices, I think: > 1. You use val2_default. The rationale is that the "c" diff driver did > not define an opt2, so you fall back to the global default. > 2. It is unset. The rationale is that you are using the "c" diff > driver, and it has left the value unset. The default then means "if > you have no diff driver setup". I'm in favor of option (2), because [diff] a.k.a [diff ""] serving as the fallback for [diff *] feels like a special case. If a full system of precedence and fallbacks is desired for .git/config, we should adopt explicit grammar that lets me define an arbitrary precedence tree over all sections. Once a powerful concept is born, somewhere down the road, some user will desire its universalization. -- 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