]> granicus.if.org Git - git/commitdiff
t5541: use test_config to set/unset git config variables
authorYann Droneaud <ydroneaud@opteya.com>
Sun, 24 Mar 2013 21:06:08 +0000 (22:06 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Mar 2013 15:50:53 +0000 (08:50 -0700)
Instead of using construct such as:
    test_when_finished "git config --unset <key>"
    git config <key> <value>
uses
    test_config <key> <value>
The latter takes care of removing <key> at the end of the test.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5541-http-push.sh

index 4b4b4a604f3075dec1056b31da5cccc0c4ed5a9a..4086f02bc129b3628c724c7037fe60509fbef46c 100755 (executable)
@@ -181,8 +181,7 @@ test_expect_success 'push (chunked)' '
        git checkout master &&
        test_commit commit path3 &&
        HEAD=$(git rev-parse --verify HEAD) &&
-       git config http.postbuffer 4 &&
-       test_when_finished "git config --unset http.postbuffer" &&
+       test_config http.postbuffer 4 &&
        git push -v -v origin $BRANCH 2>err &&
        grep "POST git-receive-pack (chunked)" err &&
        (cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&