From: Junio C Hamano <gitster@pobox.com>
To: Tay Ray Chuan <rctay89@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
"Shawn O. Pearce" <spearce@spearce.org>,
Dan McGee <dpmcgee@gmail.com>
Subject: Re: [PATCH v5 1/4] t5541-http-push: add test for chunked
Date: Wed, 04 May 2011 11:44:22 -0700 [thread overview]
Message-ID: <7vr58ee261.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1304529590-1032-1-git-send-email-rctay89@gmail.com> (Tay Ray Chuan's message of "Thu, 5 May 2011 01:19:50 +0800")
Tay Ray Chuan <rctay89@gmail.com> writes:
> + GIT_CURL_VERBOSE=1 git push -v -v 2>err &&
> + ! grep "Expect: 100-continue" err &&
> + grep "POST git-receive-pack (376 bytes)" err &&
This "376 bytes" bothers me. Can our packing algorithm never improve?
> (cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
> test $HEAD = $(git rev-parse --verify HEAD))
> '
> @@ -140,5 +142,17 @@ test_expect_success C_LOCALE_OUTPUT 'push fails for non-fast-forward refs unmatc
> output
> '
>
> +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 &&
It probably is a good style to send the command line as a single
argument. There are a few violations in the existing code but that is not
an excuse to add more violations.
> + 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))
> +'
> +
> stop_httpd
> test_done
I'll queue this with the following trivial fix-up.
By the way, the "(chunked) test" is failing for me, with
Pushing to http://127.0.0.1:5541/smart/test_repo.git
POST git-receive-pack (chunked)
POST git-receive-pack (chunked)
POST git-receive-pack (chunked)
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
in trash/test_repo_clone/err; sometimes with two POSTs and sometimes with
three POSTs before we get the "fatal:".
---
t/t5541-http-push.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index fec552c..4b93fa1 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -74,7 +74,7 @@ test_expect_success 'push to remote repository (standard)' '
HEAD=$(git rev-parse --verify HEAD) &&
GIT_CURL_VERBOSE=1 git push -v -v 2>err &&
! grep "Expect: 100-continue" err &&
- grep "POST git-receive-pack (376 bytes)" err &&
+ grep "POST git-receive-pack ([0-9]* bytes)" err &&
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
test $HEAD = $(git rev-parse --verify HEAD))
'
@@ -147,7 +147,7 @@ test_expect_success 'push (chunked)' '
test_commit commit path3 &&
HEAD=$(git rev-parse --verify HEAD) &&
git config http.postbuffer 4 &&
- test_when_finished git config --unset http.postbuffer &&
+ test_when_finished "git config --unset http.postbuffer" &&
git push -v -v origin $BRANCH 2>err &&
grep "POST git-receive-pack (chunked)" err &&
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
next prev parent reply other threads:[~2011-05-04 18:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-03 15:47 [PATCH v3 0/4] http cleanups Tay Ray Chuan
2011-05-03 15:47 ` [PATCH v3 1/4] t5541-http-push: add test for chunked Tay Ray Chuan
2011-05-03 15:47 ` [PATCH v3 2/4] http: make curl callbacks match contracts from curl header Tay Ray Chuan
2011-05-03 15:47 ` [PATCH v3 3/4] http-push: use const for strings in signatures Tay Ray Chuan
2011-05-03 15:47 ` [PATCH v3 4/4] http-push: refactor curl_easy_setup madness Tay Ray Chuan
2011-05-03 16:32 ` [PATCH v3 1/4] t5541-http-push: add test for chunked Shawn Pearce
2011-05-03 17:18 ` Tay Ray Chuan
2011-05-04 4:07 ` Junio C Hamano
2011-05-04 4:09 ` [PATCH v3 0/4] http cleanups Junio C Hamano
2011-05-04 9:50 ` Tay Ray Chuan
2011-05-04 10:11 ` [PATCH v4 " Tay Ray Chuan
2011-05-04 10:11 ` [PATCH v4 1/4] t5541-http-push: add test for chunked Tay Ray Chuan
2011-05-04 10:11 ` [PATCH v4 2/4] http: make curl callbacks match contracts from curl header Tay Ray Chuan
2011-05-04 10:11 ` [PATCH v4 3/4] http-push: use const for strings in signatures Tay Ray Chuan
2011-05-04 10:11 ` [PATCH v4 4/4] http-push: refactor curl_easy_setup madness Tay Ray Chuan
2011-05-04 11:51 ` [PATCH v4 1/4] t5541-http-push: add test for chunked Jakub Narebski
2011-05-04 18:23 ` Junio C Hamano
[not found] ` <1304529590-1032-1-git-send-email-rctay89@gmail.com>
2011-05-04 18:23 ` [PATCH v5 " Junio C Hamano
2011-05-04 18:44 ` Junio C Hamano [this message]
2011-05-04 20:28 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vr58ee261.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=dpmcgee@gmail.com \
--cc=git@vger.kernel.org \
--cc=rctay89@gmail.com \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).