Re: [PATCH v4 1/4] t5541-http-push: add test for chunked
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- May 4, 2011, 11:51 UTC
- Message-ID
- <m3wri6vg5h.fsf@localhost.localdomain>
- In-Reply-To
- <1304503896-5988-2-git-send-email-rctay89@gmail.com>
Tay Ray Chuan <rctay89@gmail.com> writes:
Show 11 quoted lines
> +test_expect_success 'push (chunked)' ' > + git checkout master && > + test_commit commit path3 && > + HEAD=$(git rev-parse --verify HEAD) && > + git 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 && > + test $HEAD = $(git rev-parse --verify HEAD)) && > + git config --unset http.postbuffer > +'
It is a very minor issue, a nitpick really; but wouldn't it be better to use
+ git config http.postbuffer 4 && + test_when_finished "git config --unset http.postbuffer" &&
This way you would have `http.postBuffer` unset even if any of intermediate commands fail, preparing clean state for next test. Though in this case that doesn't matter, as it is the very last test.
-- Jakub Narebski Poland ShadeHawk on #git