Re: config-file includes
flat view
From: David Aguilar <hidden>
Date: 2016-06-15 22:52:06
On Mon, Sep 26, 2011 at 08:45:58PM +1000, Nguyen Thai Ngoc Duy wrote:
On Sat, Sep 24, 2011 at 5:58 AM, Jeff King [off-list ref] wrote: Another thing is, what if I want to exclude certain part of the included config? [1] http://thread.gmane.org/gmane.comp.version-control.git/163285/focus=163288quoted
[1] I want conditional inclusion because sometimes the rules for config entries changes from version to version. For example, I have pager.diff set to a script in my ~/.gitconfig. But older versions of git don't understand non-boolean values and barf. I'd really like to do something like: [include-ifdef "has-pager-scripts"] path = ~/.gitconfig-pager where "has-pager-scripts" would be a magic flag compiled into git versions that understand that config.But how far would you go with conditional expressions? -- Duy
This syntax is simple yet would solve one problem I run into often. It could be used for the case where some settings (e.g. diff.tool, merge.tool) are different on OS X and Linux. [include-ifdef "darwin"] path = ~/.gitconfig-darwin -- David