diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2016-05-18 16:15:44 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-18 14:15:10 -0700 |
commit | 1dea0dc9e0965e2581cdf64fc9eb072e8d6a88d3 (patch) | |
tree | 4704f2a6a48caa260a76e7c58bf96635c25ce4c4 /t/t1403-show-ref.sh | |
parent | t1500: avoid changing working directory outside of tests (diff) | |
download | tgif-1dea0dc9e0965e2581cdf64fc9eb072e8d6a88d3.tar.xz |
t1500: avoid setting configuration options outside of tests
Ideally, each test should be responsible for setting up state it needs
rather than relying upon transient global state. Toward this end, teach
test_rev_parse() to accept a "-b <value>" option to allow callers to set
"core.bare" explicitly or undefine it. Take advantage of this new option
to avoid setting "core.bare" outside of tests.
Under the hood, "-b <value>" invokes "test_config -C <dir>" (or
"test_unconfig -C <dir>"), thus git-config knows explicitly where to
find its configuration file. Consequently, the global GIT_CONFIG
environment variable required by the manual git-config invocations
outside of tests is no longer needed, and is thus dropped.
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1403-show-ref.sh')
0 files changed, 0 insertions, 0 deletions