Skip to content

Commit

Permalink
t5541: use test_config to set/unset git config variables
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yann Droneaud authored and Junio C Hamano committed Mar 25, 2013
1 parent 9d6aa64 commit 8677b77
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions t/t5541-http-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 8677b77

Please sign in to comment.