"Shawn O. Pearce" [off-list ref] writes:
+test_expect_success 'clone http repository' '
+ GIT_CURL_VERBOSE=1 git clone $HTTPD_URL/git/repo.git clone 2>err &&
+ test_cmp file clone/file &&
+ egrep "^([<>]|Pragma|Accept|Content-|Transfer-)" err |
+ egrep -v "^< (Server|Expires|Date|Content-Length:|Transfer-Encoding: chunked)" |
+ sed -e "
+ s/
//
+ s/^Content-Length: .*$/Content-Length: xxxx/
+ " >act &&
This chomped line is so unlike you---what happened?
Also, when the last downstream is sed, why would you even need two egrep
process?
Junio C Hamano [off-list ref] wrote:
"Shawn O. Pearce" [off-list ref] writes:
quoted
+test_expect_success 'clone http repository' '
+ GIT_CURL_VERBOSE=1 git clone $HTTPD_URL/git/repo.git clone 2>err &&
+ test_cmp file clone/file &&
+ egrep "^([<>]|Pragma|Accept|Content-|Transfer-)" err |
+ egrep -v "^< (Server|Expires|Date|Content-Length:|Transfer-Encoding: chunked)" |
+ sed -e "
+ s/
//
+ s/^Content-Length: .*$/Content-Length: xxxx/
+ " >act &&
This chomped line is so unlike you---what happened?
I was getting different Content-Lengths on different runs of the
test. I don't know why. Here the Content-Length is of the gzip'd
request, it shouldn't be varying with each run, but it seemed to be.
Also, when the last downstream is sed, why would you even need two egrep
process?
That's a really good point. This is just stupid, I started with
the two egreps to filter the lines, then found I needed to strip
CRs, and then had to munge the Content-Length, and I just forgot
to merge the egrep cases into the sed script.
I'll fix this. Thanks.
--
Shawn.
"Shawn O. Pearce" [off-list ref] wrote:
Junio C Hamano [off-list ref] wrote:
quoted
quoted
+ s/^Content-Length: .*$/Content-Length: xxxx/
This chomped line is so unlike you---what happened?
I was getting different Content-Lengths on different runs of the
test. I don't know why. Here the Content-Length is of the gzip'd
request, it shouldn't be varying with each run, but it seemed to be.
FWIW, I found the variablity here. It was triggered by running the
test with -v or without -v, which caused clone to change its first
"want" line to include or exclude progress messages, based on the
tty-ness of stderr.
Adding a --quiet to the clone command means I can avoid this munging
and hard code the length in the test vector. But I'm still against
doing that here in case the protocol capabilities ever change in
the future.
--
Shawn.