From: Junio C Hamano <gitster@pobox•com>
To: Richard Purdie <rpurdie@rpsys•net>,
Daniel Barkalow <barkalow@iabervon•org>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail•com>,
"GIT Mailing-list" <git@vger•kernel.org>
Subject: Re: Overriding ~/.gitconfig using GIT_CONFIG
Date: Fri, 12 Aug 2011 12:39:07 -0700 [thread overview]
Message-ID: <7vmxfemnc4.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7vr54qmodf.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Fri, 12 Aug 2011 12:16:44 -0700")
Junio C Hamano <gitster@pobox•com> writes:
> Richard Purdie <rpurdie@rpsys•net> writes:
>
>> Looking through the manuals/code, it suggests I should be able to do:
>>
>> GIT_CONFIG=/dev/null git XXX
>>
>> and all should work happily. It doesn't though. As an example, with a
>> ~/.gitconfig, "GIT_CONFIG=/dev/null git fetch --all" is clearly
>> accessing the file in ~ and then acting upon it.
>
> If the manual says the above is expected for any value of XXX, then that
> is a bug in the manual since mid 2008, I think.
>
> See dc87183 (Only use GIT_CONFIG in "git config", not other programs,
> 2008-06-30).
>
> I _think_ these days a workaround to force a known config is to set HOME
> to a value that has a known .gitconfig (or no such file), and decline
> usage of /etc/git.config by exporting GIT_CONFIG_NOSYSTEM.
Side note. Here is what dc87183 says:
commit dc87183189b54441e315d35d48983d80ab085299
Author: Daniel Barkalow <barkalow@iabervon•org>
Date: Mon Jun 30 03:37:47 2008 -0400
Only use GIT_CONFIG in "git config", not other programs
For everything other than using "git config" to read or write a
git-style config file that isn't the current repo's config file,
GIT_CONFIG was actively detrimental. Rather than argue over which
programs are important enough to have work anyway, just fix all of
them at the root.
Also removes GIT_LOCAL_CONFIG, which would only be useful for programs
that do want to use global git-specific config, but not the repo's own
git-specific config, and want to use some other, presumably
git-specific config. Despite being documented, I can't find any sign that
it was ever used.
Signed-off-by: Daniel Barkalow <barkalow@iabervon•org>
Signed-off-by: Junio C Hamano <gitster@pobox•com>
It clearly explains the reason why LOCAL_CONFIG was removed (the reader
does not have to agree with "I can't find any sign that it was ever used",
though), but I cannot read from the first paragraph the reason why it was
felt necessary not to honor GIT_CONFIG in other programs, i.e. "was
actively detrimental" is not backed by any example in the paragraph. I can
sort of sense from "Rather than argue over..." that there may have been a
discussion on the list, and reading the archive from that timeframe may
reveal why many felt it was not a good idea.
Daniel, do you recall the context?
next prev parent reply other threads:[~2011-08-12 19:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 15:38 Overriding ~/.gitconfig using GIT_CONFIG Richard Purdie
2011-08-12 19:16 ` Junio C Hamano
2011-08-12 19:39 ` Junio C Hamano [this message]
2011-08-12 20:44 ` Richard Purdie
2011-08-28 13:05 ` David Aguilar
2011-08-29 12:16 ` Richard Purdie
2011-08-30 3:10 ` David Aguilar
2011-08-30 12:13 ` Richard Purdie
2011-08-30 15:56 ` Jeff King
2011-08-30 18:39 ` Richard Purdie
2011-08-30 18:49 ` Jeff King
2011-09-05 19:29 ` Richard Purdie
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=7vmxfemnc4.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox$(echo .)com \
--cc=barkalow@iabervon$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=pclouds@gmail$(echo .)com \
--cc=rpurdie@rpsys$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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