Re: [PATCH] config: use GIT_CONFIG in git config sequence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mateusz Nowotyński <maxmati4@xxxxxxxxx> 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.

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.







[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux