<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/technical/api-strbuf.txt, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-04-10T19:58:33Z</updated>
<entry>
<title>strbuf: create strbuf_humanise_bytes() to show byte sizes</title>
<updated>2013-04-10T19:58:33Z</updated>
<author>
<name>Antoine Pelisse</name>
<email>apelisse@gmail.com</email>
</author>
<published>2013-04-10T19:03:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=079b546a2940a84989893254a318c8414e13a13e'/>
<id>urn:sha1:079b546a2940a84989893254a318c8414e13a13e</id>
<content type='text'>
Humanization of downloaded size is done in the same function as text
formatting in 'process.c'. The code cannot be reused easily elsewhere.

Separate text formatting from size simplification and make the
function public in strbuf so that it can easily be used by other
callers.

We now can use strbuf_humanise_bytes() for both downloaded size and
download speed calculation. One of the drawbacks is that speed will
now look like this when download is stalled: "0 bytes/s" instead of
"0 KiB/s".

Signed-off-by: Antoine Pelisse &lt;apelisse@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Allow custom "comment char"</title>
<updated>2013-01-16T20:48:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-16T19:18:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eff80a9fd990de3605063050dae32f969ef18ba8'/>
<id>urn:sha1:eff80a9fd990de3605063050dae32f969ef18ba8</id>
<content type='text'>
Some users do want to write a line that begin with a pound sign, #,
in their commit log message.  Many tracking system recognise
a token of #&lt;bugid&gt; form, for example.

The support we offer these use cases is not very friendly to the end
users.  They have a choice between

 - Don't do it.  Avoid such a line by rewrapping or indenting; and

 - Use --cleanup=whitespace but remove all the hint lines we add.

Give them a way to set a custom comment char, e.g.

    $ git -c core.commentchar="%" commit

so that they do not have to do either of the two workarounds.

[jc: although I started the topic, all the tests and documentation
updates, many of the call sites of the new strbuf_add_commented_*()
functions, and the change to git-submodule.sh scripted Porcelain are
from Ralf.]

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Ralf Thielow &lt;ralf.thielow@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strbuf_split*(): document functions</title>
<updated>2012-11-04T11:46:55Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2012-11-04T06:46:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=06379a65098212aef05010598ba3a8549bd78474'/>
<id>urn:sha1:06379a65098212aef05010598ba3a8549bd78474</id>
<content type='text'>
Document strbuf_split_buf(), strbuf_split_str(), strbuf_split_max(),
strbuf_split(), and strbuf_list_free() in the header file and in
api-strbuf.txt.  (These functions were previously completely
undocumented.)

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>strbuf: improve strbuf_get*line documentation</title>
<updated>2012-02-23T21:52:11Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2012-02-23T09:42:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1c5f93b9a69f4c1c3d09853243562b9ae3bf79a6'/>
<id>urn:sha1:1c5f93b9a69f4c1c3d09853243562b9ae3bf79a6</id>
<content type='text'>
Clarify strbuf_getline() documentation, and add the missing documentation
for strbuf_getwholeline() and strbuf_getwholeline_fd().

Signed-off-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
