<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/strbuf.h, branch v1.7.7.4</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.7.4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.7.4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2011-07-19T16:45:21Z</updated>
<entry>
<title>Merge branch 'jk/maint-config-param'</title>
<updated>2011-07-19T16:45:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-07-19T16:45:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=fe01ef31b79af85ca50738b11b048e3fad856d34'/>
<id>urn:sha1:fe01ef31b79af85ca50738b11b048e3fad856d34</id>
<content type='text'>
* jk/maint-config-param:
  config: use strbuf_split_str instead of a temporary strbuf
  strbuf: allow strbuf_split to work on non-strbufs
  config: avoid segfault when parsing command-line config
  config: die on error in command-line config
  fix "git -c" parsing of values with equals signs
  strbuf_split: add a max parameter
</content>
</entry>
<entry>
<title>strbuf: allow strbuf_split to work on non-strbufs</title>
<updated>2011-06-22T18:24:51Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2011-06-09T15:54:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2f1d9e2b93e1b7fbfcfa59331db89dd6c76a3505'/>
<id>urn:sha1:2f1d9e2b93e1b7fbfcfa59331db89dd6c76a3505</id>
<content type='text'>
The strbuf_split function takes a strbuf as input, and
outputs a list of strbufs. However, there is no reason that
the input has to be a strbuf, and not an arbitrary buffer.

This patch adds strbuf_split_buf for a length-delimited
buffer, and strbuf_split_str for NUL-terminated strings.

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_split: add a max parameter</title>
<updated>2011-06-22T18:24:50Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2011-06-09T15:51:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=28fc3a6857a5d7a6b4f63b2672fb0ce966b0df78'/>
<id>urn:sha1:28fc3a6857a5d7a6b4f63b2672fb0ce966b0df78</id>
<content type='text'>
Sometimes when splitting, you only want a limited number of
fields, and for the final field to contain "everything
else", even if it includes the delimiter.

This patch introduces strbuf_split_max, which provides a
"max number of fields" parameter; it behaves similarly to
perl's "split" with a 3rd field.

The existing 2-argument form of strbuf_split is retained for
compatibility and ease-of-use.

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: clarify assertion in strbuf_setlen()</title>
<updated>2011-04-27T17:52:15Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2011-04-27T17:24:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7141efab2481214fcab8fb853207b343435fcad4'/>
<id>urn:sha1:7141efab2481214fcab8fb853207b343435fcad4</id>
<content type='text'>
Commit a8f3e2219 introduced the strbuf_grow() call to strbuf_setlen() to
make ensure that there was at least one byte available to write the
mandatory trailing NUL, even for previously unallocated strbufs.

Then b315c5c0 added strbuf_slopbuf for the same reason, only globally for
all uses of strbufs.

Thus the strbuf_grow() call can be removed now.  This avoids readers of
strbuf.h from mistakenly thinking that strbuf_setlen() can be used to
extend a strbuf.

The following assert() needs to be changed to cope with the fact that
sb-&gt;alloc can now be zero, which is OK as long as len is also zero.  As
suggested by Junio, use the chance to convert it to a die() with a short
explanatory message.  The pattern of 'die("BUG: ...")' is already used in
strbuf.c.

This was the only assert() in strbuf.[ch], so assert.h doesn't have to be
included anymore either.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2011-03-30T21:10:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-03-30T21:10:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=17a02998078923f2d62811326d130de991d1a95a'/>
<id>urn:sha1:17a02998078923f2d62811326d130de991d1a95a</id>
<content type='text'>
* maint:
  contrib/thunderbird-patch-inline: do not require bash to run the script
  t8001: check the exit status of the command being tested
  strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead
  Typos: t/README
  Documentation/config.txt: make truth value of numbers more explicit
  git-pack-objects.txt: fix grammatical errors
  parse-remote: replace unnecessary sed invocation
</content>
</entry>
<entry>
<title>strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead</title>
<updated>2011-03-30T19:02:50Z</updated>
<author>
<name>Michael Witten</name>
<email>mfwitten@gmail.com</email>
</author>
<published>2011-02-15T23:12:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e0390119b249252a633875e4327c8a6463e4b6cb'/>
<id>urn:sha1:e0390119b249252a633875e4327c8a6463e4b6cb</id>
<content type='text'>
Signed-off-by: Michael Witten &lt;mfwitten@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strbuf: add strbuf_vaddf</title>
<updated>2011-02-26T09:06:50Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2011-02-26T05:08:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=ebeb60900fbab569ed14f710a0a1abb1637ec792'/>
<id>urn:sha1:ebeb60900fbab569ed14f710a0a1abb1637ec792</id>
<content type='text'>
In a variable-args function, the code for writing into a strbuf is
non-trivial. We ended up cutting and pasting it in several places
because there was no vprintf-style function for strbufs (which in turn
was held up by a lack of va_copy).

Now that we have a fallback va_copy, we can add strbuf_vaddf, the
strbuf equivalent of vsprintf. And we can clean up the cut and paste
mess.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Improved-by: Christian Couder &lt;christian.couder@gmail.com&gt;
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>strbuf.h: fix comment typo</title>
<updated>2010-09-27T17:42:11Z</updated>
<author>
<name>Pat Notz</name>
<email>patnotz@gmail.com</email>
</author>
<published>2010-09-16T20:53:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4af3fab06e41d031ccb2b948ddd7c73159dd9d49'/>
<id>urn:sha1:4af3fab06e41d031ccb2b948ddd7c73159dd9d49</id>
<content type='text'>
Signed-off-by: Pat Notz &lt;patnotz@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/maint-strbuf-add-fix-doubling'</title>
<updated>2010-01-20T22:43:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-01-20T22:43:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=886932e2816ba8554ba0bf6c2c91fdfa6877dd65'/>
<id>urn:sha1:886932e2816ba8554ba0bf6c2c91fdfa6877dd65</id>
<content type='text'>
* jc/maint-strbuf-add-fix-doubling:
  strbuf_addbuf(): allow passing the same buf to dst and src
</content>
</entry>
<entry>
<title>Merge branch 'jk/warn-author-committer-after-commit'</title>
<updated>2010-01-20T22:40:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-01-20T22:40:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=0877510ad4e8b951b08f9cbb25cfc0d994468979'/>
<id>urn:sha1:0877510ad4e8b951b08f9cbb25cfc0d994468979</id>
<content type='text'>
* jk/warn-author-committer-after-commit:
  user_ident_sufficiently_given(): refactor the logic to be usable from elsewhere
  commit.c::print_summary: do not release the format string too early
  commit: allow suppression of implicit identity advice
  commit: show interesting ident information in summary
  strbuf: add strbuf_addbuf_percentquote
  strbuf_expand: convert "%%" to "%"

Conflicts:
	builtin-commit.c
	ident.c
</content>
</entry>
</feed>
