Re: [PATCH v4 1/4] t5541-http-push: add test for chunked

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tay Ray Chuan <rctay89@xxxxxxxxx> writes:

> +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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]