<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/http-backend.c, branch v2.1.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.1.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.1.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-07-21T19:35:39Z</updated>
<entry>
<title>Merge branch 'maint'</title>
<updated>2014-07-21T19:35:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-21T19:35:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ab08822556c49a7856dadd0e9a42f9ec2aaf850'/>
<id>urn:sha1:9ab08822556c49a7856dadd0e9a42f9ec2aaf850</id>
<content type='text'>
* maint:
  use xmemdupz() to allocate copies of strings given by start and length
  use xcalloc() to allocate zero-initialized memory
</content>
</entry>
<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>use skip_prefix to avoid magic numbers</title>
<updated>2014-06-20T17:44:45Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-18T19:47:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ae021d87911da4328157273df24779892cb51277'/>
<id>urn:sha1:ae021d87911da4328157273df24779892cb51277</id>
<content type='text'>
It's a common idiom to match a prefix and then skip past it
with a magic number, like:

  if (starts_with(foo, "bar"))
	  foo += 3;

This is easy to get wrong, since you have to count the
prefix string yourself, and there's no compiler check if the
string changes.  We can use skip_prefix to avoid the magic
numbers here.

Note that some of these conversions could be much shorter.
For example:

  if (starts_with(arg, "--foo=")) {
	  bar = arg + 6;
	  continue;
  }

could become:

  if (skip_prefix(arg, "--foo=", &amp;bar))
	  continue;

However, I have left it as:

  if (skip_prefix(arg, "--foo=", &amp;v)) {
	  bar = v;
	  continue;
  }

to visually match nearby cases which need to actually
process the string. Like:

  if (skip_prefix(arg, "--foo=", &amp;v)) {
	  bar = atoi(v);
	  continue;
  }

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>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>
</feed>
