Several test scripts manually unset GIT_CONFIG and other
GIT_* variables. These are generally taken care of for us by
test-lib.sh already.
Unsetting these is not only useless, but can be confusing to
a reader, who may wonder why some tests in a script unset
them and others do not (t0001 is particularly guilty of this
inconsistency, probably because many of its tests predate
the test-lib.sh environment-cleansing).
Note that we cannot always get rid of such unsetting. For
example, t9130 can drop the GIT_CONFIG unset, but not the
GIT_DIR one, because lib-git-svn.sh sets the latter. And in
t1000, we unset GIT_TEMPLATE_DIR, which is explicitly
initialized by test-lib.sh.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test_expect_failure 'plain nested in bare through aliased command' '
(
sane_unset GIT_DIR GIT_WORK_TREE &&
git init --bare bare-ancestor-aliased.git &&
cd bare-ancestor-aliased.git &&
echo "[alias] aliasedinit = init" >>config &&
@ -91,7 +86,6 @@ test_expect_failure 'plain nested in bare through aliased command' '
@@ -91,7 +86,6 @@ test_expect_failure 'plain nested in bare through aliased command' '
test_expect_success 'plain with GIT_WORK_TREE' '
if (
sane_unset GIT_DIR &&
mkdir plain-wt &&
cd plain-wt &&
GIT_WORK_TREE=$(pwd) git init
@ -104,7 +98,6 @@ test_expect_success 'plain with GIT_WORK_TREE' '
@@ -104,7 +98,6 @@ test_expect_success 'plain with GIT_WORK_TREE' '