<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/lib-httpd.sh, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-03-05T23:06:45Z</updated>
<entry>
<title>Merge branch 'jk/run-network-tests-by-default'</title>
<updated>2014-03-05T23:06:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-05T23:06:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ee3a81e69cde27add025e206cd9dd2937c80f230'/>
<id>urn:sha1:ee3a81e69cde27add025e206cd9dd2937c80f230</id>
<content type='text'>
Teach "make test" to run networking tests when possible by default.

* jk/run-network-tests-by-default:
  tests: turn on network daemon tests by default
</content>
</entry>
<entry>
<title>tests: turn on network daemon tests by default</title>
<updated>2014-02-14T16:13:51Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-02-10T21:29:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=83d842dc8ce4380aa365485b4d9845762f80c6db'/>
<id>urn:sha1:83d842dc8ce4380aa365485b4d9845762f80c6db</id>
<content type='text'>
We do not run the httpd nor git-daemon tests by default, as
they are rather heavyweight and require network access
(albeit over localhost). However, it would be nice if more
pepole ran them, for two reasons:

  1. We would get more test coverage on more systems.

  2. The point of the test suite is to find regressions. It
     is very easy to change some of the underlying code and
     break the httpd code without realizing you are even
     affecting it. Running the httpd tests helps find these
     problems sooner (ideally before the patches even hit
     the list).

We still want to leave an "out", though, for people who really do
not want to run them. For that reason, the GIT_TEST_HTTPD and
GIT_TEST_GIT_DAEMON variables are now tri-state booleans
(true/false/auto), so you can say GIT_TEST_HTTPD=false to turn the
tests back off.  To support those who want a stable single way to
disable these tests across versions of Git before and after this
change, an empty string explicitly set to these variables is also
taken as "false", so the behaviour changes only for those who:

  a. did not express any preference by leaving these variables
     unset.  They did not test these features before, but now they
     do; or

  b. did express that they want to test these features by setting
     GIT_TEST_FEATURE=false (or any equivalent other ways to tell
     "false" to Git, e.g. "0"), which has been a valid but funny way
     to say that they do want to test the feature only because we
     used to interpret any non-empty string to mean "yes please
     test".  They no longer test that feature.

In addition, we are forgiving of common setup failures (e.g., you do
not have apache installed, or have an old version) when the
tri-state is "auto" (or unset), but report an error when it is
"true". This makes "auto" a sane default, as we should not cause
failures on setups where the tests cannot run. But it allows people
who use "true" to catch regressions in their system (e.g., they
uninstalled apache, but were expecting their automated test runs to
test git-httpd, and would want to be notified).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tests: auto-set LIB_HTTPD_PORT from test name</title>
<updated>2014-02-10T18:20:45Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-02-10T14:39:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3bb486e4397415e1855e5edbf28d8e50c3d45265'/>
<id>urn:sha1:3bb486e4397415e1855e5edbf28d8e50c3d45265</id>
<content type='text'>
We set the default apache port for each of the httpd tests
to the 4-digit test number of the test script. We want these
to remain unique so that the tests do not conflict with each
other when run in parallel.

Instead of doing it manually in each test script, let's just
set it from the test name at run time. This is simpler, and
is one less thing to be updated when test scripts are
renamed (e.g., when being re-rolled or when conflicting
after being merged with another topic).

Incidentally, this fixes a case where t5537 and t5538 used
the same port number (5537), and could conflict with each
other when run in parallel.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/http-auth-tests-robustify'</title>
<updated>2014-01-10T18:33:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-01-10T18:33:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=35a116d740930f34e0d3cd2e07ed266e96a1d165'/>
<id>urn:sha1:35a116d740930f34e0d3cd2e07ed266e96a1d165</id>
<content type='text'>
Using the same username and password during the tests would not
catch a potential breakage of sending one when we should be sending
the other.

* jk/http-auth-tests-robustify:
  use distinct username/password for http auth tests
</content>
</entry>
<entry>
<title>use distinct username/password for http auth tests</title>
<updated>2014-01-02T18:25:03Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-01-02T07:38:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=afbf5ca507470aab6716671f2ad207c74cd585fb'/>
<id>urn:sha1:afbf5ca507470aab6716671f2ad207c74cd585fb</id>
<content type='text'>
The httpd server we set up to test git's http client code
knows about a single account, in which both the username and
password are "user@host" (the unusual use of the "@" here is
to verify that we handle the character correctly when URL
escaped).

This means that we may miss a certain class of errors in
which the username and password are mixed up internally by
git. We can make our tests more robust by having distinct
values for the username and password.

In addition to tweaking the server passwd file and the
client URL, we must teach the "askpass" harness to accept
multiple values. As a bonus, this makes the setup of some
tests more obvious; when we are expecting git to ask
only about the password, we can seed the username askpass
response with a bogus value.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>test: replace shebangs with descriptions in shell libraries</title>
<updated>2013-11-26T22:23:52Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2013-11-25T21:03:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c74c72034f061d1d9d5b8b1fba20ce0138d423b4'/>
<id>urn:sha1:c74c72034f061d1d9d5b8b1fba20ce0138d423b4</id>
<content type='text'>
A #! line in these files is misleading, since these scriptlets are
meant to be sourced with '.' (using whatever shell sources them)
instead of run directly using the interpreter named on the #! line.

Removing the #! line shouldn't hurt syntax highlighting since
these files have filenames ending with '.sh'.  For documentation,
add a brief description of how the files are meant to be used in
place of the shebang line.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/http-auth-redirects'</title>
<updated>2013-10-30T19:09:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-10-30T19:09:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=177f0a400955f2345c73a5c8b0459d617429ffd9'/>
<id>urn:sha1:177f0a400955f2345c73a5c8b0459d617429ffd9</id>
<content type='text'>
Handle the case where http transport gets redirected during the
authorization request better.

* jk/http-auth-redirects:
  http.c: Spell the null pointer as NULL
  remote-curl: rewrite base url from info/refs redirects
  remote-curl: store url as a strbuf
  remote-curl: make refs_url a strbuf
  http: update base URLs when we see redirects
  http: provide effective url to callers
  http: hoist credential request out of handle_curl_result
  http: refactor options to http_get_*
  http_request: factor out curlinfo_strbuf
  http_get_file: style fixes
</content>
</entry>
<entry>
<title>remote-curl: rewrite base url from info/refs redirects</title>
<updated>2013-10-15T00:01:34Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-09-28T08:35:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=050ef3655c8ea1dc7a2b3b843ca7c45dd94d9c88'/>
<id>urn:sha1:050ef3655c8ea1dc7a2b3b843ca7c45dd94d9c88</id>
<content type='text'>
For efficiency and security reasons, an earlier commit in
this series taught http_get_* to re-write the base url based
on redirections we saw while making a specific request.

This commit wires that option into the info/refs request,
meaning that a redirect from

    http://example.com/foo.git/info/refs

to

    https://example.com/bar.git/info/refs

will behave as if "https://example.com/bar.git" had been
provided to git in the first place.

The tests bear some explanation. We introduce two new
hierearchies into the httpd test config:

  1. Requests to /smart-redir-limited will work only for the
     initial info/refs request, but not any subsequent
     requests. As a result, we can confirm whether the
     client is re-rooting its requests after the initial
     contact, since otherwise it will fail (it will ask for
     "repo.git/git-upload-pack", which is not redirected).

  2. Requests to smart-redir-auth will redirect, and require
     auth after the redirection. Since we are using the
     redirected base for further requests, we also update
     the credential struct, in order not to mislead the user
     (or credential helpers) about which credential is
     needed. We can therefore check the GIT_ASKPASS prompts
     to make sure we are prompting for the new location.
     Because we have neither multiple servers nor https
     support in our test setup, we can only redirect between
     paths, meaning we need to turn on
     credential.useHttpPath to see the difference.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
</content>
</entry>
<entry>
<title>t5541: mark passing c-a-s test as success</title>
<updated>2013-09-20T18:18:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-09-20T10:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=42aa29ee12bbc769567c4c8ed694566511ef2e39'/>
<id>urn:sha1:42aa29ee12bbc769567c4c8ed694566511ef2e39</id>
<content type='text'>
Commit 05c1eb1 (push: teach --force-with-lease to smart-http
transport) fixed the compare-and-swap test in t5541. It
tried to mark the test as passing by teaching the test
helper function to expect an extra "success or failure"
parameter, but forgot to actually use the parameter in the
helper.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: teach --force-with-lease to smart-http transport</title>
<updated>2013-08-02T23:11:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-08-02T22:14:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=05c1eb10348f159908becc7a6ed6bbcdab24c893'/>
<id>urn:sha1:05c1eb10348f159908becc7a6ed6bbcdab24c893</id>
<content type='text'>
We have been passing enough information to enable the
compare-and-swap logic down to the transport layer, but the
transport helper was not passing it to smart-http transport.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
