test-lib: add test_config_global variant
authorJeff King <peff@peff.net>
Sat, 10 Dec 2011 10:30:06 +0000 (05:30 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Dec 2011 07:16:24 +0000 (23:16 -0800)
The point of test_config is to simultaneously set a config
variable and register its cleanup handler, like:

test_config core.foo bar

However, it stupidly assumes that $1 contained the name of
the variable, which means it won't work for:

test_config --global core.foo bar

We could try to parse the command-line ourselves and figure
out which parts need to be fed to test_unconfig. But since
this is likely the most common variant, it's much simpler
and less error-prone to simply add a new function.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found