Code

test-lib: add test_config_global variant
[git.git] / t / test-lib.sh
index bdd9513b84301275330d3dd7e49af05081ef9cd7..160479b81ea2f2f902c5e579a9a3469b92c656bf 100644 (file)
@@ -379,6 +379,11 @@ test_config () {
        git config "$@"
 }
 
+test_config_global () {
+       test_when_finished "test_unconfig --global '$1'" &&
+       git config --global "$@"
+}
+
 # Use test_set_prereq to tell that a particular prerequisite is available.
 # The prerequisite can later be checked for in two ways:
 #