From: David Aguilar <davvid@gmail.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Jeff King <peff@peff.net>,
git@vger.kernel.org, Michael Haggerty <mhagger@alum.mit.edu>,
Jay Soffian <jaysoffian@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Jakub Narebski <jnareb@gmail.com>
Subject: Re: config-file includes
Date: Mon, 26 Sep 2011 21:21:27 +0200 [thread overview]
Message-ID: <20110926192126.GA55743@gmail.com> (raw)
In-Reply-To: <CACsJy8BAVRAct=sxTpZ+b-ft1OjbY9oZG6uEXrcsTXw3CXnwSg@mail.gmail.com>
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 <peff@peff.net> 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=163288
>
> > [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
next prev parent reply other threads:[~2011-09-26 19:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 19:58 config-file includes Jeff King
2011-09-26 10:45 ` Nguyen Thai Ngoc Duy
2011-09-26 12:36 ` Jeff King
2011-09-26 19:21 ` David Aguilar [this message]
2011-09-26 20:05 ` Jeff King
2011-09-26 21:12 ` Junio C Hamano
2011-09-27 2:13 ` Jay Soffian
2011-09-27 2:38 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110926192126.GA55743@gmail.com \
--to=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jaysoffian@gmail.com \
--cc=jnareb@gmail.com \
--cc=mhagger@alum.mit.edu \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).