test-lib-functions: support "test_config -C <dir> ..."
commit5fafc07fca933be10c82ba97a6fd3b28d6b3a02e
authorJohn Keeping <john@keeping.me.uk>
Sat, 5 Sep 2015 13:12:47 +0000 (5 14:12 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Sep 2015 17:35:01 +0000 (8 10:35 -0700)
tree28f4fdadf956efa8543b89ecb3356971b2a342c8
parentc545bc6266e36fdb798cf79fd1f7ef9f39791a94
test-lib-functions: support "test_config -C <dir> ..."

If used in a subshell, test_config cannot unset variables at the end of
a test.  This is a problem when testing submodules because we do not
want to "cd" at to top level of a test script in order to run the
command inside the submodule.

Add a "-C" option to test_config (and test_unconfig) so that test_config
can be kept outside subshells and still affect subrepositories.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib-functions.sh