From: Jeff King <peff@peff.net>
To: Jakub Narebski <jnareb@gmail.com>
Cc: David Aguilar <davvid@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 0/2] config includes, take 2
Date: Thu, 9 Feb 2012 14:33:14 -0500 [thread overview]
Message-ID: <20120209193314.GA19690@sigill.intra.peff.net> (raw)
In-Reply-To: <201202092024.43381.jnareb@gmail.com>
On Thu, Feb 09, 2012 at 08:24:42PM +0100, Jakub Narebski wrote:
> > So the patch would look something like this. However, is the actual
> > filename really what callers want? It seems like in David's case, an
> > annotation of "repo", "global", or "system" (possibly in addition to the
> > filename) would be the most useful (because in the git-cola UI, it is
> > still nice to list things as "repo" or "global" instead of spewing the
> > whole filename at the user -- but you would still want the individual
> > filename for handling updates of includes).
>
> I'm not sure if "system" / "global" / "local" or "repo" would be a good
> idea.
>
> First, in the case of includes you would have to provide pathnames of
> included files. This would introduce inconsistency. Is "system"
> the '/etc/gitconfig' file, or 'system' file in '.git' directory?
Yeah, it would have to be syntactically unambiguous with the filename.
I was thinking something of just including both, like this:
global:/home/peff/.gitconfig<TAB>include.path=other-file
global:/home/peff/other-file<TAB>some.key=value
That is, give a "context" (repo, global, system) to each lookup, and
then mention the individual file as well (either because it is the root
of that context, or because it was included). So a config editor could
present the context to the user as a purely decorative thing (i.e., tell
the user "these options affect all of your repos"), but use the filename
to actually update the values (i.e., "git config -f
/home/peff/other-file some.key newvalue").
> Second, people can have different build configuration, e.g. the prefix
> might differ, so that "system" is not always '/etc/gitconfig'. If you
> want to edit config you would want to know which file to edit... and though
> there is "git config --system --edit" it depends on having editor
> configured correctly.
Without includes, something like git-cola could possibly get away with:
git config --system some.key value
but that doesn't work for included files; for those, you'd want to have
the actual filename.
-Peff
prev parent reply other threads:[~2012-02-09 19:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-06 6:27 [PATCH 0/2] config includes, take 2 Jeff King
2012-02-06 6:29 ` [PATCH 1/2] imap-send: remove dead code Jeff King
2012-02-06 6:31 ` [PATCH 2/2] config: add include directive Jeff King
2012-02-06 7:41 ` [PATCH 0/2] config includes, take 2 Junio C Hamano
2012-02-06 9:53 ` Michael Haggerty
2012-02-06 10:06 ` Jeff King
2012-02-06 10:16 ` Jeff King
2012-02-07 5:01 ` David Aguilar
2012-02-07 5:17 ` Jeff King
2012-02-07 10:05 ` David Aguilar
2012-02-07 17:30 ` Jeff King
2012-02-07 18:03 ` Junio C Hamano
2012-02-07 18:29 ` Jeff King
2012-02-07 19:16 ` Jakub Narebski
2012-02-07 19:21 ` Jeff King
2012-02-07 20:15 ` David Aguilar
2012-02-09 3:30 ` Jeff King
2012-02-09 19:24 ` Jakub Narebski
2012-02-09 19:33 ` Jeff King [this message]
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=20120209193314.GA19690@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
/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).