git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Philip Oakley <philipoakley@iee.email>
Cc: "Matt Rogers" <mattr94@gmail.com>,
	"Mateusz Nowotyński" <maxmati4@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>,
	bwilliams.eng@gmail.com
Subject: Re: [PATCH] config: use GIT_CONFIG in git config sequence
Date: Sun, 26 Apr 2020 14:16:34 -0700	[thread overview]
Message-ID: <xmqqwo627xsd.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <8992c1a7-a638-e823-1cb7-2c8f6b28d486@iee.email> (Philip Oakley's message of "Sun, 26 Apr 2020 21:04:50 +0100")

Philip Oakley <philipoakley@iee.email> writes:

> Mateusz's original problem was with discovery of these env variables,...

I somehow doubt it.  

Certainly, defeating /etc/gitconfig should be a part of the solution
to the "I want a stable environment to run tests reproducibly,
without getting affected by random settings the testing user may get
affected" problem.  It is not enough to defeat $HOME/.gitconfig (and
its xdg variant).

But I didn't get the feeling that Mateusz was even aware of the need
to defeat the system wide configuration; Mateusz only mentioned and
cared about $HOME/.gitconfig (and its xdg variant).

And the thing is that we do have support for an environment variable
to defeat the system-wide configuration (GIT_CONFIG_NOSYSTEM), but
discovering it would not have been sufficient to solve the "stable
environment for reproducible tests" problem, as we do not have an
environment variable to defeat the global (i.e. per user) one.

So, I do not think the problem was with discovery at all.  The
problem was two levels deep, (1) not realizing the need to defeat
the system wide settings (for which the environment may have been a
good solution once the need to solve that problem got recognised),
and (2) not realizing the need to redirect $HOME for programs other
than git, hence omitting $HOME/.gitconfig from the sequence is not
a sufficient solution.

Having said all that, I addition of GIT_CONFIG_NOGLOBAL (or
GIT_CONFIG_NOUSER) may not be such a bad thing.  We probably will
add GIT_CONFIG_NOLOCAL (or GIT_CONFIG_NOREPOSITORY) to complement
these two if that happens.  I dunno.


  reply	other threads:[~2020-04-26 21:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25 23:57 [PATCH] config: use GIT_CONFIG in git config sequence Mateusz Nowotyński
2020-04-26  0:16 ` Junio C Hamano
2020-04-26  9:58   ` Philip Oakley
2020-04-26 19:32   ` Mateusz Nowotyński
2020-04-26 20:08     ` brian m. carlson
2020-04-27 20:04       ` Mateusz Nowotynski
2020-04-26 21:01     ` Junio C Hamano
2020-04-26  1:12 ` Matt Rogers
2020-04-26 10:00   ` Philip Oakley
2020-04-26 13:30     ` Matt Rogers
2020-04-26 20:04       ` Philip Oakley
2020-04-26 21:16         ` Junio C Hamano [this message]
2020-04-26 22:32           ` Junio C Hamano
2020-04-27 19:39             ` Mateusz Nowotynski

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=xmqqwo627xsd.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=bwilliams.eng@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mattr94@gmail.com \
    --cc=maxmati4@gmail.com \
    --cc=philipoakley@iee.email \
    /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).