git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philip Oakley <philipoakley@iee.email>
To: "Junio C Hamano" <gitster@pobox.com>,
	"Mateusz Nowotyński" <maxmati4@gmail.com>
Cc: git@vger.kernel.org, mattr94@gmail.com, bwilliams.eng@gmail.com
Subject: Re: [PATCH] config: use GIT_CONFIG in git config sequence
Date: Sun, 26 Apr 2020 10:58:34 +0100	[thread overview]
Message-ID: <383520d8-0623-ecf5-bb02-230a35359a6b@iee.email> (raw)
In-Reply-To: <xmqq5zdn9k3r.fsf@gitster.c.googlers.com>

On 26/04/2020 01:16, Junio C Hamano wrote:
> Mateusz Nowotyński <maxmati4@gmail.com> writes:
>
>> Currently, there is no way to use config file other then ~/.gitconfig.
>> This can cause a problem, for example, when running tests of software that
>> depends on git. In such a case user's gitconfig may contain settings that
>> are incompatible with tests.
> While I can remotely imagine how an environment variable that
> overrides everything might be useful at times, we already use
> GIT_CONFIG environment for a different purpose, so even if such a
> feature were desirable, the name is already taken, and you'd want to
> hunt for another one.  Also, I do not think I'll take this patch if
> the justification were solely the above, as it is a solved problem,
> together with the use of GIT_CONFIG_NOSYSTEM and GIT_ATTR_NOSYSTEM.

Mateusz: is there a discoverability/documentation issue for these extra
config settings (a better patch maybe there).
I know in the past (in another context) I had failed to appreciate that
these had been set so couldn't work out why some problems were occurring
for me when testing some ideas.
>
> Tests of a software that depends on git, and perhaps other things,
> will be affected in things under the testing user's home directory,
> and not just ~/.gitconfig file.  Providing stable environment to run
> in to your tests is a useful thing to do, but it is not a viable or
> a particularly smart strategy for doing so to tweak each and every
> software that your software may depend on, and your software itself,
> with a custom change like this patch.
>
> You can prepare a pretend-home directory for the use of your tests
> and point the environment variable $HOME to it while running your
> tests.  See how we do this in our test suite for inspiration---it
> all happens in t/test-lib.sh, I think.
>
> Thanks.
>
--
Philip

  reply	other threads:[~2020-04-26  9:58 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 [this message]
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
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=383520d8-0623-ecf5-bb02-230a35359a6b@iee.email \
    --to=philipoakley@iee.email \
    --cc=bwilliams.eng@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mattr94@gmail.com \
    --cc=maxmati4@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).