On Mon, Sep 26, 2011 at 4:05 PM, Jeff King <peff@xxxxxxxx> wrote: >> [include-ifdef "darwin"] >> path = ~/.gitconfig-darwin > > Thanks for another concrete example. > > I'm not sure how that would be implemented, though. I don't think git > knows that it is compiled for darwin. Would it just be running "uname > -s" behind the scenes? Should it happen at runtime, or as part of the > compile process? > > We could allow arbitrary shell code like: > > [include-if "test `uname -s` -eq Darwin"] > > Very flexible, though it makes me think we are getting a little > overboard. And it's an extra shell invocation whenever we read the > config, which is ugly. I would think git could just learn a few useful defines at the time of compile, such as e.g. OS_Darwin would be more than sufficient. I can also give you another use use case. I keep all my work repos under ~Work/ and I want my user.email on all those to be my work email addy, and all other repos on my system I want to use my personal email address. So my ~/.gitconfig has my personal email address and then 99% of the time I forget to configure the repos under ~/Work correctly. That said, I'm not sure how the config include would help this... j. -- 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