git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jacob Keller <jacob.keller@gmail.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Junio C Hamano <gitster@pobox.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Yaroslav Halchenko <yoh@onerussian.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>,
	kyle@kyleam.com, Jeff King <peff@peff.net>
Subject: Re: Q: rational for $XDG_CONFIG_HOME/git/config to be "non global" or just a bug?
Date: Sun, 17 Dec 2017 20:03:41 -0800	[thread overview]
Message-ID: <CA+P7+xpFyD0zuOz7XSCc6cV1T1zu6j-gZD=EMQs-t2WPxi1EMA@mail.gmail.com> (raw)
In-Reply-To: <20171216220120.GB6217@genre.crustytoothpaste.net>

On Sat, Dec 16, 2017 at 2:01 PM, brian m. carlson
<sandals@crustytoothpaste.net> wrote:
> On Mon, Dec 11, 2017 at 05:05:01PM -0800, Junio C Hamano wrote:
>> Jonathan Nieder <jrnieder@gmail.com> writes:
>> > As for "git config --global", I think the best thing would be to split
>> > it into two options: something like "git config --user" and "git
>> > config --xdg-user".  That way, it is unambiguous which configuration
>> > file the user intends to inspect or modify.  When a user calls "git
>> > config --global" and both files exist, it could warn that the command
>> > is ambiguous.
>> >
>> > Thoughts?
>>
>> I actually thought that the plan was "you either have this, or the
>> other one, never both at the same time" (and I think those who
>> pushed the XDG thing in to the system made us favor it over the
>> traditional one).  So as long as --global updates the one that
>> exists, and updates XDG one when both or neither do, I think we
>> should be OK.  And from that viewpoint, we definitely do not want
>> two kinds of --global to pretend as if we support use of both at the
>> same time.
>
> Sorry for coming late to the discussion, but I actually use both.
>
> ~/.gitconfig is checked into my Git repo for my home directory and
> contains settings I preserve across all systems, and the XDG dir is not
> checked in and contains per-system settings (currently just
> commit.gpgsign).  On my main systems I have a key and sign commits; if
> it's just some server I log into, I don't.
>
> Now, I don't use git config to set options, so I'm happy as long as git
> config can read both, which it does.
> --
> brian m. carlson / brian with sandals: Houston, Texas, US
> https://www.crustytoothpaste.net/~bmc | My opinion only
> OpenPGP: https://keybase.io/bk2204


Ok, so my patch documentation is wrong. Perhaps we could further
clarify in the documentation how it works, but I'm not really sure
what the best approach is.

I do find it a bit weird that --global writes to one of either file,
and doesn't read from both. I'd rather have --global "only" be
.gitconfig, and instead add a new option for handling XDG file, and
then have it such that it reads them in system -> xdg ->
home/.gitconfig -> local, which allows for local .gitconfig to
override XDG config, but logically treat them just like we do any
other files.

Thanks,
Jake

  reply	other threads:[~2017-12-18  4:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-11 21:11 Q: rational for $XDG_CONFIG_HOME/git/config to be "non global" or just a bug? Yaroslav Halchenko
2017-12-11 22:56 ` Jonathan Nieder
2017-12-12  0:48   ` Yaroslav Halchenko
2017-12-12  1:05   ` Junio C Hamano
2017-12-12  9:36     ` Jacob Keller
2017-12-12 19:36       ` Junio C Hamano
2017-12-13  5:35         ` Jacob Keller
2017-12-12 14:13     ` Yaroslav Halchenko
2017-12-13  5:35       ` Jacob Keller
2017-12-16 22:01     ` brian m. carlson
2017-12-18  4:03       ` Jacob Keller [this message]
2017-12-18  6:40         ` Jeff King
2017-12-18 14:21           ` Yaroslav Halchenko
2017-12-18 16:55             ` Junio C Hamano
2017-12-18 19:56           ` Jacob Keller

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+P7+xpFyD0zuOz7XSCc6cV1T1zu6j-gZD=EMQs-t2WPxi1EMA@mail.gmail.com' \
    --to=jacob.keller@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=kyle@kyleam.com \
    --cc=peff@peff.net \
    --cc=sandals@crustytoothpaste.net \
    --cc=yoh@onerussian.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).