<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/technical/api-strbuf.txt, branch v1.7.3.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.7.3.4</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.7.3.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2010-01-14T17:25:15Z</updated>
<entry>
<title>strbuf: add strbuf_addbuf_percentquote</title>
<updated>2010-01-14T17:25:15Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2010-01-13T17:36:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=361df5df77255321b2ca409d892b4c24b7b0441d'/>
<id>urn:sha1:361df5df77255321b2ca409d892b4c24b7b0441d</id>
<content type='text'>
This is handy for creating strings which will be fed to printf() or
strbuf_expand().

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_expand: convert "%%" to "%"</title>
<updated>2010-01-14T17:24:42Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2010-01-13T17:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0a0416a34a7ef5c64f4e0226371e4cab8c1ba982'/>
<id>urn:sha1:0a0416a34a7ef5c64f4e0226371e4cab8c1ba982</id>
<content type='text'>
The only way to safely quote arbitrary text in a pretty-print user
format is to replace instances of "%" with "%x25". This is slightly
unreadable, and many users would expect "%%" to produce a single
"%", as that is what printf format specifiers do.

This patch converts "%%" to "%" for all users of strbuf_expand():

 (1) git-daemon interpolated paths

 (2) pretty-print user formats

 (3) merge driver command lines

Case (1) was already doing the conversion itself outside of
strbuf_expand(). Case (2) is the intended beneficiary of this patch.
Case (3) users probably won't notice, but as this is user-facing
behavior, consistently providing the quoting mechanism makes sense.

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>api-strbuf.txt: fix typos and document launch_editor()</title>
<updated>2009-12-18T05:54:28Z</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2009-12-18T00:05:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=63b76948e1d211ad4a95c3a9c7a0087fe6a1e371'/>
<id>urn:sha1:63b76948e1d211ad4a95c3a9c7a0087fe6a1e371</id>
<content type='text'>
Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Documentation: Typo / spelling / formatting fixes</title>
<updated>2009-03-04T05:43:19Z</updated>
<author>
<name>Mike Ralphson</name>
<email>mike@abacus.co.uk</email>
</author>
<published>2009-03-03T19:29:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a1070d4cbbf1002cc0b01afc3de06382deb0511a'/>
<id>urn:sha1:a1070d4cbbf1002cc0b01afc3de06382deb0511a</id>
<content type='text'>
Signed-off-by: Mike Ralphson &lt;mike@abacus.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2009-02-04T08:12:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-04T08:12:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b63bc0bc3152ca42ba1c9fa9bed73da061beeca2'/>
<id>urn:sha1:b63bc0bc3152ca42ba1c9fa9bed73da061beeca2</id>
<content type='text'>
* maint:
  User-manual: "git stash &lt;comment&gt;" form is long gone
  add test-dump-cache-tree in Makefile
  fix typo in Documentation
  apply: fix access to an uninitialized mode variable, found by valgrind

Conflicts:
	Makefile
</content>
</entry>
<entry>
<title>Merge branch 'maint-1.6.0' into maint</title>
<updated>2009-02-04T07:50:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-04T07:50:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f0817310903312bbc243dd80f066e17a8e0e4b1d'/>
<id>urn:sha1:f0817310903312bbc243dd80f066e17a8e0e4b1d</id>
<content type='text'>
* maint-1.6.0:
  User-manual: "git stash &lt;comment&gt;" form is long gone
  add test-dump-cache-tree in Makefile
  fix typo in Documentation
  apply: fix access to an uninitialized mode variable, found by valgrind
</content>
</entry>
<entry>
<title>fix typo in Documentation</title>
<updated>2009-02-04T06:09:03Z</updated>
<author>
<name>Guanqun Lu</name>
<email>guanqun.lu@gmail.com</email>
</author>
<published>2009-02-04T21:00:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c9a8abcf9a9997d463a6a05668fd9a90a26df1f2'/>
<id>urn:sha1:c9a8abcf9a9997d463a6a05668fd9a90a26df1f2</id>
<content type='text'>
Signed-off-by: Guanqun Lu &lt;guanqun.lu@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strbuf: instate cleanup rule in case of non-memory errors</title>
<updated>2009-01-07T06:13:43Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-01-06T20:41:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2fc647004ac7016128372a85db8245581e493812'/>
<id>urn:sha1:2fc647004ac7016128372a85db8245581e493812</id>
<content type='text'>
Make all strbuf functions that can fail free() their memory on error if
they have allocated it.  They don't shrink buffers that have been grown,
though.

This allows for easier error handling, as callers only need to call
strbuf_release() if A) the command succeeded or B) if they would have had
to do so anyway because they added something to the strbuf themselves.

Bonus hunk: document strbuf_readlink.

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>add strbuf_expand_dict_cb(), a helper for simple cases</title>
<updated>2008-11-24T03:55:47Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2008-11-22T23:09:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9b864e730bda0e028a85387fa568429724582f22'/>
<id>urn:sha1:9b864e730bda0e028a85387fa568429724582f22</id>
<content type='text'>
The new callback function strbuf_expand_dict_cb() can be used together
with strbuf_expand() if there is only a small number of placeholders
for static replacement texts.  It expects its dictionary as an array of
placeholder+value pairs as context parameter, terminated by an entry
with the placeholder member set to NULL.

The new helper is intended to aid converting the remaining calls of
interpolate().  strbuf_expand() is smaller, more flexible and can be
used to go faster than interpolate(), so it should replace the latter.

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>Strbuf documentation: document most functions</title>
<updated>2008-06-04T22:02:42Z</updated>
<author>
<name>Miklos Vajna</name>
<email>vmiklos@frugalware.org</email>
</author>
<published>2008-06-04T21:20:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dd613e6b8706f31c01aae622345dbaab3f276262'/>
<id>urn:sha1:dd613e6b8706f31c01aae622345dbaab3f276262</id>
<content type='text'>
All functions in strbuf.h are documented, except launch_editor().

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