git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [Q] would it be bad to make /etc/gitconfig runtime configurable?
Date: Tue, 27 Sep 2016 15:25:40 -0400	[thread overview]
Message-ID: <20160927192539.ybooc34iodnzs2ab@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqoa39p926.fsf@gitster.mtv.corp.google.com>

On Tue, Sep 27, 2016 at 10:05:37AM -0700, Junio C Hamano wrote:

> The subject says it all.  Would it be bad if we introduce an
> environment variable, GIT_SYSTEM_CONFIG=/etc/gitconfig, that names
> an alternative location of the system-wide configuration file?
> 
> That would supersede/deprecate GIT_CONFIG_NOSYSTEM that we
> introduced primarily so that we can run our tests without getting
> affected by the configuration that happens to be effective on the
> host that the test is being run.

I can't think of a reason it would be bad. There shouldn't be a security
question, as controlling the environment already lets you run arbitrary
code, override system config variables, etc.

I know when I was writing the tests for 0d44a2d (config: return
configset value for current_config_ functions, 2016-05-26) I had to omit
the "system" case, because we had no way of pointing at a specific file.
So I do not know whether a runtime system config variable would be
useful for users, but it would definitely make testing easier.

-Peff

  reply	other threads:[~2016-09-27 19:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-27 17:05 [Q] would it be bad to make /etc/gitconfig runtime configurable? Junio C Hamano
2016-09-27 19:25 ` Jeff King [this message]
2016-10-03 11:06   ` Johannes Schindelin
2016-10-03 11:26     ` Jeff King
2016-10-03 16:24       ` Junio C Hamano

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=20160927192539.ybooc34iodnzs2ab@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).