From: Jeff King <peff@peff.net>
To: Timothee Cour <timothee.cour2@gmail.com>
Cc: Eric Wong <e@yhbt.net>, git@vger.kernel.org
Subject: Re: git makes it impossible to ignore or override global gitconfig, needs `GITCONFIGFILE`
Date: Fri, 20 Mar 2020 01:41:01 -0400 [thread overview]
Message-ID: <20200320054101.GF499858@coredump.intra.peff.net> (raw)
In-Reply-To: <CANri+EzrP0TeHTfjhsf=LZkwkEZU7fSRnnKN9NLga7CNow9F0Q@mail.gmail.com>
On Thu, Mar 19, 2020 at 07:28:58PM -0700, Timothee Cour wrote:
> * require passing commands (eg `git -c`) is not good either; it'd
> require updating scripts that rely on git (this could be arbitrarily
> complex, sometimes impossible if you just have a binary and no source
> code access)
Well, yes, that's why I suggested setting $GIT_CONFIG_PARAMETERS
directly. :)
That said, I don't have any real opposition to an environment variable
to override the user-level config location, if somebody wants to work up
a patch. A few preliminary thoughts:
- there are several levels of config file, so it probably should be
called GIT_GLOBAL_CONFIG or something to make it clear that it
matches "config --global" (and not system or repo-level config)
- we'll read user-level config from multiple sources currently:
~/.gitconfig and the xdg config dir. Presumably this would override
them rather than add to them to be of any use.
- I wondered for a moment if such a variable would need to be added to
local_repo_env[] to get cleared when moving between repos. But as a
user-level thing, it should be outside that.
-Peff
prev parent reply other threads:[~2020-03-20 5:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-19 5:48 git makes it impossible to ignore or override global gitconfig, needs `GITCONFIGFILE` Timothee Cour
2020-03-19 6:44 ` Eric Wong
2020-03-19 16:51 ` Jeff King
2020-03-20 2:28 ` Timothee Cour
2020-03-20 5:41 ` 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
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=20200320054101.GF499858@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=e@yhbt.net \
--cc=git@vger.kernel.org \
--cc=timothee.cour2@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.
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).