git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Tay Ray ChuanNext: Junio C Hamano
Message 16 of 20 in “http cleanups”
  1. 0/4 http cleanupsTay Ray Chuan, May 3, 2011
  2. 1/4 t5541-http-push: add test for chunkedTay Ray Chuan, May 3, 2011
  3. 2/4 http: make curl callbacks match contracts from curl headerTay Ray Chuan, May 3, 2011
  4. 3/4 http-push: use const for strings in signaturesTay Ray Chuan, May 3, 2011
  5. 4/4 http-push: refactor curl_easy_setup madnessTay Ray Chuan, May 3, 2011
  6. Shawn PearceMay 3, 2011
  7. Tay Ray ChuanMay 3, 2011
  8. Junio C HamanoMay 4, 2011
  9. Junio C HamanoMay 4, 2011
  10. Tay Ray ChuanMay 4, 2011
  11. 0/4 http cleanupsTay Ray Chuan, May 4, 2011
  12. 1/4 t5541-http-push: add test for chunkedTay Ray Chuan, May 4, 2011
  13. 2/4 http: make curl callbacks match contracts from curl headerTay Ray Chuan, May 4, 2011
  14. 3/4 http-push: use const for strings in signaturesTay Ray Chuan, May 4, 2011
  15. 4/4 http-push: refactor curl_easy_setup madnessTay Ray Chuan, May 4, 2011
  16. Jakub NarebskiMay 4, 2011
  17. Junio C HamanoMay 4, 2011
  18. Junio C HamanoMay 4, 2011
  19. Junio C HamanoMay 4, 2011
  20. Junio C HamanoMay 4, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.