<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/strbuf.h, 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-16T18:26:00Z</updated>
<entry>
<title>Merge branch 'jk/strip-suffix'</title>
<updated>2014-07-16T18:26:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-16T18:25:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e4094731acee5207595a8416d19508107ea475d'/>
<id>urn:sha1:6e4094731acee5207595a8416d19508107ea475d</id>
<content type='text'>
* jk/strip-suffix:
  prepare_packed_git_one: refactor duplicate-pack check
  verify-pack: use strbuf_strip_suffix
  strbuf: implement strbuf_strip_suffix
  index-pack: use strip_suffix to avoid magic numbers
  use strip_suffix instead of ends_with in simple cases
  replace has_extension with ends_with
  implement ends_with via strip_suffix
  add strip_suffix function
  sha1_file: replace PATH_MAX buffer with strbuf in prepare_packed_git_one()
</content>
</entry>
<entry>
<title>strbuf: implement strbuf_strip_suffix</title>
<updated>2014-06-30T20:43:32Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-30T17:01:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6dda4e60f2c3c309de6e3fe1b86a47846a86dabf'/>
<id>urn:sha1:6dda4e60f2c3c309de6e3fe1b86a47846a86dabf</id>
<content type='text'>
You can almost get away with just calling "strip_suffix_mem"
on a strbuf's buf and len fields. But we also need to move
the NUL-terminator to satisfy strbuf's invariants. Let's
provide a convenience wrapper that handles this.

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>strbuf: add xstrfmt helper</title>
<updated>2014-06-19T19:25:17Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-18T20:01:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=30a0ddb705678d512185e359831479a6b3567147'/>
<id>urn:sha1:30a0ddb705678d512185e359831479a6b3567147</id>
<content type='text'>
You can use a strbuf to build up a string from parts, and
then detach it. In the general case, you might use multiple
strbuf_add* functions to do the building. However, in many
cases, a single strbuf_addf is sufficient, and we end up
with:

  struct strbuf buf = STRBUF_INIT;
  ...
  strbuf_addf(&amp;buf, fmt, some, args);
  str = strbuf_detach(&amp;buf, NULL);

We can make this much more readable (and avoid introducing
an extra variable, which can clutter the code) by
introducing a convenience function:

  str = xstrfmt(fmt, some, args);

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-errors'</title>
<updated>2014-06-16T19:18:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-16T19:18:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2075a0c27fa5cf4f9f03964d407dc015c1749a7e'/>
<id>urn:sha1:2075a0c27fa5cf4f9f03964d407dc015c1749a7e</id>
<content type='text'>
Propagate the error messages from the webserver better to the
client coming over the HTTP transport.

* jk/http-errors:
  http: default text charset to iso-8859-1
  remote-curl: reencode http error messages
  strbuf: add strbuf_reencode helper
  http: optionally extract charset parameter from content-type
  http: extract type/subtype portion of content-type
  t5550: test display of remote http error messages
  t/lib-httpd: use write_script to copy CGI scripts
  test-lib: preserve GIT_CURL_VERBOSE from the environment
</content>
</entry>
<entry>
<title>Merge branch 'jk/strbuf-tolower'</title>
<updated>2014-06-16T17:07:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-16T17:07:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4bba8de115b6aa48103443cc81a3be7111095a9'/>
<id>urn:sha1:b4bba8de115b6aa48103443cc81a3be7111095a9</id>
<content type='text'>
* jk/strbuf-tolower:
  strbuf: add strbuf_tolower function
</content>
</entry>
<entry>
<title>Merge branch 'jk/daemon-tolower'</title>
<updated>2014-06-16T17:07:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-16T17:07:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4516df9b88989a175f88aa514a187831631f9f8'/>
<id>urn:sha1:b4516df9b88989a175f88aa514a187831631f9f8</id>
<content type='text'>
* jk/daemon-tolower:
  daemon/config: factor out duplicate xstrdup_tolower
</content>
</entry>
<entry>
<title>strbuf: add strbuf_reencode helper</title>
<updated>2014-05-27T16:59:21Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-22T09:30:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d4241f52d1a19bf464d63cbc4cd67fcc6a3af01d'/>
<id>urn:sha1:d4241f52d1a19bf464d63cbc4cd67fcc6a3af01d</id>
<content type='text'>
This is a convenience wrapper around `reencode_string_len`
and `strbuf_attach`.

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>strbuf: add strbuf_tolower function</title>
<updated>2014-05-23T21:09:58Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-23T20:03:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ffb20ce125f0ffe59002b1258b06c26747b69b7b'/>
<id>urn:sha1:ffb20ce125f0ffe59002b1258b06c26747b69b7b</id>
<content type='text'>
This is a convenience wrapper to call tolower on each
character of the string.

This makes config's lowercase() function obsolete, though
note that because we have a strbuf, we are careful to
operate over the whole strbuf, rather than assuming that a
NUL is the end-of-string.

We could continue to offer a pure-string lowercase, but
there would be no callers (in most pure-string cases, we
actually duplicate and lowercase the duplicate, for which we
have the xstrdup_tolower wrapper).

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>daemon/config: factor out duplicate xstrdup_tolower</title>
<updated>2014-05-23T19:39:44Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-22T09:44:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=88d5a6f6cd1b63e1637027322cdfdbeefe38c3ed'/>
<id>urn:sha1:88d5a6f6cd1b63e1637027322cdfdbeefe38c3ed</id>
<content type='text'>
We have two implementations of the same function; let's drop
that to one. We take the name from daemon.c, but the
implementation (which is just slightly more efficient) from
the config code.

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>strbuf: style fix -- top opening bracket on a separate line</title>
<updated>2014-03-03T20:26:08Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-03-01T02:50:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=187e290a98ebac7ce393685ea64ad2ba5d5c2dc2'/>
<id>urn:sha1:187e290a98ebac7ce393685ea64ad2ba5d5c2dc2</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
