<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/http-backend.c, branch v2.0.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-07-21T17:37:02Z</updated>
<entry>
<title>use xmemdupz() to allocate copies of strings given by start and length</title>
<updated>2014-07-21T17:37:02Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-07-19T15:35:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5c0b13f85ab3a5326508b854768eb70c8829cda4'/>
<id>urn:sha1:5c0b13f85ab3a5326508b854768eb70c8829cda4</id>
<content type='text'>
Use xmemdupz() to allocate the memory, copy the data and make sure to
NUL-terminate the result, all in one step.  The resulting code is
shorter, doesn't contain the constants 1 and '\0', and avoids
duplicating function parameters.

For blame, the last copied byte (o-&gt;file.ptr[o-&gt;file.size]) is always
set to NUL by fake_working_tree_commit() or read_sha1_file(), so no
information is lost by the conversion to using xmemdupz().

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>replace {pre,suf}fixcmp() with {starts,ends}_with()</title>
<updated>2013-12-05T22:13:21Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2013-11-30T20:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=59556548230e617b837343c2c07e357e688e2ca4'/>
<id>urn:sha1:59556548230e617b837343c2c07e357e688e2ca4</id>
<content type='text'>
Leaving only the function definitions and declarations so that any
new topic in flight can still make use of the old functions, replace
existing uses of the prefixcmp() and suffixcmp() with new API
functions.

The change can be recreated by mechanically applying this:

    $ git grep -l -e prefixcmp -e suffixcmp -- \*.c |
      grep -v strbuf\\.c |
      xargs perl -pi -e '
        s|!prefixcmp\(|starts_with\(|g;
        s|prefixcmp\(|!starts_with\(|g;
        s|!suffixcmp\(|ends_with\(|g;
        s|suffixcmp\(|!ends_with\(|g;
      '

on the result of preparatory changes in this series.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/http-backend-allow-405'</title>
<updated>2013-09-20T19:30:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-09-20T19:30:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=26e53f8ac02a5929e4b614010afaa9787f567698'/>
<id>urn:sha1:26e53f8ac02a5929e4b614010afaa9787f567698</id>
<content type='text'>
When the webserver responds with "405 Method Not Allowed", it
should tell the client what methods are allowed with the "Allow"
header.

* bc/http-backend-allow-405:
  http-backend: provide Allow header for 405
</content>
</entry>
<entry>
<title>http-backend: provide Allow header for 405</title>
<updated>2013-09-12T15:44:44Z</updated>
<author>
<name>Brian M. Carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2013-09-12T00:30:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9247be05cf686dc98dd504f8f9fb0f07da1a29d1'/>
<id>urn:sha1:9247be05cf686dc98dd504f8f9fb0f07da1a29d1</id>
<content type='text'>
The HTTP 1.1 standard requires an Allow header for 405 Method Not Allowed:

  The response MUST include an Allow header containing a list of valid methods
  for the requested resource.

So provide such a header when we return a 405 to the user agent.

Signed-off-by: Brian M. Carlson &lt;sandals@crustytoothpaste.net&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>show_head_ref(): rename first parameter to "refname"</title>
<updated>2013-06-02T22:28:47Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2013-05-25T09:08:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3e4ca43fd0ea0f6a150de3be096b52954d64f523'/>
<id>urn:sha1:3e4ca43fd0ea0f6a150de3be096b52954d64f523</id>
<content type='text'>
This is the usual convention.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>show_head_ref(): do not shadow name of argument</title>
<updated>2013-06-02T22:28:47Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2013-05-25T09:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d811dbd04afc9fd4e59d1a1a2c090abb835d55f'/>
<id>urn:sha1:1d811dbd04afc9fd4e59d1a1a2c090abb835d55f</id>
<content type='text'>
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/http-dumb-namespaces'</title>
<updated>2013-04-18T18:49:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-04-18T18:49:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=77354d8cdc6e0bf407de23d762760cccee5d757c'/>
<id>urn:sha1:77354d8cdc6e0bf407de23d762760cccee5d757c</id>
<content type='text'>
Allow smart-capable HTTP servers to be restricted via the
GIT_NAMESPACE mechanism when talking with commit-walker clients
(they already do so when talking with smart HTTP clients).

* jk/http-dumb-namespaces:
  http-backend: respect GIT_NAMESPACE with dumb clients
</content>
</entry>
<entry>
<title>http-backend: respect GIT_NAMESPACE with dumb clients</title>
<updated>2013-04-10T01:06:44Z</updated>
<author>
<name>John Koleszar</name>
<email>jkoleszar@google.com</email>
</author>
<published>2013-04-10T00:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6130f86deabe15c78d966b3588f47dbd653ec4fa'/>
<id>urn:sha1:6130f86deabe15c78d966b3588f47dbd653ec4fa</id>
<content type='text'>
Filter the list of refs returned via the dumb HTTP protocol according
to the active namespace, consistent with other clients of the
upload-pack service.

Signed-off-by: John Koleszar &lt;jkoleszar@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pkt-line: drop safe_write function</title>
<updated>2013-02-20T21:42:21Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-02-20T20:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cdf4fb8e332f9641ac1ca95e999fe98251d31392'/>
<id>urn:sha1:cdf4fb8e332f9641ac1ca95e999fe98251d31392</id>
<content type='text'>
This is just write_or_die by another name. The one
distinction is that write_or_die will treat EPIPE specially
by suppressing error messages. That's fine, as we die by
SIGPIPE anyway (and in the off chance that it is disabled,
write_or_die will simulate it).

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>http-backend: respect existing GIT_COMMITTER_* variables</title>
<updated>2012-03-30T16:13:02Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-03-30T07:01:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e32a4581bcbf1cf43cd5069a0d19df07542d612a'/>
<id>urn:sha1:e32a4581bcbf1cf43cd5069a0d19df07542d612a</id>
<content type='text'>
The http-backend program sets default GIT_COMMITTER_NAME and
GIT_COMMITTER_EMAIL variables based on the REMOTE_USER and
REMOTE_ADDR variables provided by the webserver. However, it
unconditionally overwrites any existing GIT_COMMITTER
variables, which may have been customized by site-specific
code in the webserver (or in a script wrapping http-backend).

Let's leave those variables intact if they already exist,
assuming that any such configuration was intentional. There
is a slight chance of a regression if somebody has set
GIT_COMMITTER_* for the entire webserver, not intending it
to leak through http-backend. We could protect against this
by passing the information in alternate variables.  However,
it seems unlikely that anyone will care about that
regression, and there is value in the simplicity of using
the common variable names that are used elsewhere in git.

While we're tweaking the environment-handling in
http-backend, let's switch it to use argv_array to handle
the list of variables. That makes the memory management much
simpler.

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