From: Michael J Gruber <git@drmicha.warpmail.net>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>,
Miklos Vajna <vmiklos@frugalware.org>, Moe <moe@signalbeam.net>,
git@vger.kernel.org
Subject: Re: [PATCH] Introduce the GIT_HOME environment variable
Date: Mon, 21 Dec 2009 17:54:03 +0100 [thread overview]
Message-ID: <4B2FA82B.3080305@drmicha.warpmail.net> (raw)
In-Reply-To: <vpqskb49tuq.fsf@bauges.imag.fr>
Matthieu Moy venit, vidit, dixit 21.12.2009 17:26:
> Jeff King <peff@peff.net> writes:
>
>> Are we even close to having this sort of universal support for
>> ~/.config?
>
> Definitely not universal as of now. Probably precisely because each
> application thinks "I'll take care of $XDG_CONFIG_HOME after others
> do" ;-).
>
>> Traditionally, the standard for Unix
>> has been for config files to be $HOME/.something. You can argue that
>> ~/.config is a better standard, but I don't think git is failing to
>> use a standard; it is simply following a different one.
>
> I've probably been unclear about this. I'm not arguing about moving
> away from $HOME/.gitconfig as the default (IOW, we're in agreement
> here ;-) ). It's there, and the migration path would be much more
> painfull than the benefit.
>
> What I'm saying is that _if_ we introduce a variable to point to an
> alternate .gitconfig, then we should use something like
> $XDG_CONFIG_HOME/git/config and not $GIT_HOME/.gitconfig
>
> I don't have a strong opinion on whether we should introduce such
> variable (it seems the only use-case is the one which started this
> thread, and it is already solved without it, so ...).
>
>> But we do have such a variable: $HOME. The concept of $GIT_HOME was
>> proposed to provide a way to divert _just_ git to a different config
>> directory, something that would not be any easier with
>> $XDG_CONFIG_HOME.
>
> Right, but I don't see any use-case for this.
>
> The use-case which started this thread was to have several physical
> users using the same Unix account, with the desire that each physical
> user should be able to use his own editor setups. In this case, you
> want your editor and your other applications to follow the schema.
>
>> Anyway, as far as the future of git goes, even if we did want to switch
>> to $XDG_CONFIG_HOME, we could not do so suddenly without breaking
>> everybody's current setup. Which would mean any implementation of it
>> would have to handle both the current and the new proposed locations.
>> You can obviously just read from both, but there are a lot of open
>> questions, like "which should take precedence?" and "what does git
>> config --global --edit do?". I am not opposed to hearing a clever
>> proposal that handles all such issues, but I am not going to think too
>> hard about it myself. :)
>
> Right, the thing I had in mind was to use $XDG_CONFIG_HOME just like
> $GIT_HOME (i.e. use it if it's set), but doing so would suddenly break
> the setup of people having already set $XDG_CONFIG_HOME, and having a
> $HOME/.gitconfig.
>
> Well, then, I don't know, maybe my proposal wasn't as clever as I
> thought ;-).
Well, I'd say the usual approach would be "use the first one found out
of $XYZ/config and $HOME/.gitconfig in this order", whether XYZ equals
$GIT_HOME or $XDG_CONFIG_HOME/git or what not. And that applies both to
reading as well writing the config. We should only merge config from
different types of sources (system/global/local), not from alternate
locations within the same type.
That way, nobody's setup gets broken, and having "git_custom_home()"
factorized out there is no real maintenance burden. I have no opinion
about the choice of XYZ.
Michael
next prev parent reply other threads:[~2009-12-21 16:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-18 22:54 FEATURE REQUEST: Env override GIT_GLOBAL_CONFIG Moe
2009-12-19 1:32 ` [PATCH] Introduce the GIT_CONFIG_EXTRA environment variable Miklos Vajna
2009-12-19 2:09 ` Shawn O. Pearce
2009-12-19 3:06 ` Moe
2009-12-19 14:25 ` Miklos Vajna
2009-12-19 3:24 ` Junio C Hamano
2009-12-19 4:44 ` Moe
2009-12-19 5:55 ` Junio C Hamano
2009-12-19 7:20 ` Moe
2009-12-19 10:54 ` Johannes Schindelin
2009-12-19 11:38 ` Moe
2009-12-19 14:45 ` Nanako Shiraishi
2009-12-19 15:30 ` [PATCH] Introduce the GIT_HOME " Miklos Vajna
2009-12-19 16:18 ` Michael J Gruber
2009-12-19 16:44 ` Miklos Vajna
2009-12-19 17:10 ` Matthieu Moy
2009-12-19 19:13 ` Junio C Hamano
2009-12-21 10:25 ` Matthieu Moy
2009-12-21 15:59 ` Jeff King
2009-12-21 16:26 ` Matthieu Moy
2009-12-21 16:54 ` Michael J Gruber [this message]
2009-12-19 19:21 ` Junio C Hamano
2009-12-20 0:34 ` Miklos Vajna
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=4B2FA82B.3080305@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=moe@signalbeam.net \
--cc=peff@peff.net \
--cc=vmiklos@frugalware.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.