<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/mktree.c, branch v1.6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.6.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2009-02-04T23:08:49Z</updated>
<entry>
<title>Replace deprecated dashed git commands in usage</title>
<updated>2009-02-04T23:08:49Z</updated>
<author>
<name>Alexander Potashev</name>
<email>aspotashev@gmail.com</email>
</author>
<published>2009-01-04T18:39:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=34263de0265a484bf44058819a363bb1e627c0ce'/>
<id>urn:sha1:34263de0265a484bf44058819a363bb1e627c0ce</id>
<content type='text'>
Signed-off-by: Alexander Potashev &lt;aspotashev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add calls to git_extract_argv0_path() in programs that call git_config_*</title>
<updated>2009-01-26T08:26:05Z</updated>
<author>
<name>Steffen Prohaska</name>
<email>prohaska@zib.de</email>
</author>
<published>2009-01-18T12:00:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2fb3f6db96492b680899f9e40f434eeb4c778a84'/>
<id>urn:sha1:2fb3f6db96492b680899f9e40f434eeb4c778a84</id>
<content type='text'>
Programs that use git_config need to find the global configuration.
When runtime prefix computation is enabled, this requires that
git_extract_argv0_path() is called early in the program's main().

This commit adds the necessary calls.

Signed-off-by: Steffen Prohaska &lt;prohaska@zib.de&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Replace calls to strbuf_init(&amp;foo, 0) with STRBUF_INIT initializer</title>
<updated>2008-10-12T19:36:19Z</updated>
<author>
<name>Brandon Casey</name>
<email>casey@nrlssc.navy.mil</email>
</author>
<published>2008-10-09T19:12:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f285a2d7ed6548666989406de8f0e7233eb84368'/>
<id>urn:sha1:f285a2d7ed6548666989406de8f0e7233eb84368</id>
<content type='text'>
Many call sites use strbuf_init(&amp;foo, 0) to initialize local
strbuf variable "foo" which has not been accessed since its
declaration. These can be replaced with a static initialization
using the STRBUF_INIT macro which is just as readable, saves a
function call, and takes up fewer lines.

Signed-off-by: Brandon Casey &lt;casey@nrlssc.navy.mil&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>Rework unquote_c_style to work on a strbuf.</title>
<updated>2007-09-21T06:32:18Z</updated>
<author>
<name>Pierre Habouzit</name>
<email>madcoder@debian.org</email>
</author>
<published>2007-09-19T22:42:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7fb1011e610a28518959b1d2d48cea17ecc32048'/>
<id>urn:sha1:7fb1011e610a28518959b1d2d48cea17ecc32048</id>
<content type='text'>
If the gain is not obvious in the diffstat, the resulting code is more
readable, _and_ in checkout-index/update-index we now reuse the same buffer
to unquote strings instead of always freeing/mallocing.

This also is more coherent with the next patch that reworks quoting
functions.

The quoting function is also made more efficient scanning for backslashes
and treating portions of strings without a backslash at once.

Signed-off-by: Pierre Habouzit &lt;madcoder@debian.org&gt;
</content>
</entry>
<entry>
<title>Drop strbuf's 'eof' marker, and make read_line a first class citizen.</title>
<updated>2007-09-18T07:55:10Z</updated>
<author>
<name>Pierre Habouzit</name>
<email>madcoder@debian.org</email>
</author>
<published>2007-09-17T09:19:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e6c019d0b0140fae1cdfd661746cbe319b6c3670'/>
<id>urn:sha1:e6c019d0b0140fae1cdfd661746cbe319b6c3670</id>
<content type='text'>
read_line is now strbuf_getline, and is a first class citizen, it returns 0
when reading a line worked, EOF else.

The -&gt;eof marker was used non-locally by fast-import.c, mimic the same
behaviour using a static int in "read_next_command", that now returns -1 on
EOF, and avoids to call strbuf_getline when it's in EOF state.

Also no longer automagically strbuf_release the buffer, it's counter
intuitive and breaks fast-import in a very subtle way.

Note: being at EOF implies that command_buf.len == 0.

Signed-off-by: Pierre Habouzit &lt;madcoder@debian.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Now that cache.h needs strbuf.h, remove useless includes.</title>
<updated>2007-09-17T00:30:03Z</updated>
<author>
<name>Pierre Habouzit</name>
<email>madcoder@debian.org</email>
</author>
<published>2007-09-15T13:56:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ba3ed09728cb25e004d3b732de14fca8aeb602f6'/>
<id>urn:sha1:ba3ed09728cb25e004d3b732de14fca8aeb602f6</id>
<content type='text'>
Signed-off-by: Pierre Habouzit &lt;madcoder@debian.org&gt;
Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Strbuf API extensions and fixes.</title>
<updated>2007-09-10T19:48:24Z</updated>
<author>
<name>Pierre Habouzit</name>
<email>madcoder@debian.org</email>
</author>
<published>2007-09-10T10:35:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f1696ee398e92bcea3cdc7b3da85d8e0f77f6c50'/>
<id>urn:sha1:f1696ee398e92bcea3cdc7b3da85d8e0f77f6c50</id>
<content type='text'>
  * Add strbuf_rtrim to remove trailing spaces.
  * Add strbuf_insert to insert data at a given position.
  * Off-by one fix in strbuf_addf: strbuf_avail() does not counts the final
    \0 so the overflow test for snprintf is the strict comparison. This is
    not critical as the growth mechanism chosen will always allocate _more_
    memory than asked, so the second test will not fail. It's some kind of
    miracle though.
  * Add size extension hints for strbuf_init and strbuf_read. If 0, default
    applies, else:
      + initial buffer has the given size for strbuf_init.
      + first growth checks it has at least this size rather than the
        default 8192.

Signed-off-by: Pierre Habouzit &lt;madcoder@debian.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mktree: Simplify write_tree() using strbuf API</title>
<updated>2007-09-07T06:57:44Z</updated>
<author>
<name>Pierre Habouzit</name>
<email>madcoder@debian.org</email>
</author>
<published>2007-09-06T11:20:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d52bc66152834dff3fb5f32a54f6ed57730f58c6'/>
<id>urn:sha1:d52bc66152834dff3fb5f32a54f6ed57730f58c6</id>
<content type='text'>
Signed-off-by: Pierre Habouzit &lt;madcoder@debian.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Rework strbuf API and semantics.</title>
<updated>2007-09-07T06:57:44Z</updated>
<author>
<name>Pierre Habouzit</name>
<email>madcoder@debian.org</email>
</author>
<published>2007-09-06T11:20:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b449f4cfc972929b638b90d375b8960c37790618'/>
<id>urn:sha1:b449f4cfc972929b638b90d375b8960c37790618</id>
<content type='text'>
  The gory details are explained in strbuf.h. The change of semantics this
patch enforces is that the embeded buffer has always a '\0' character after
its last byte, to always make it a C-string. The offs-by-one changes are all
related to that very change.

  A strbuf can be used to store byte arrays, or as an extended string
library. The `buf' member can be passed to any C legacy string function,
because strbuf operations always ensure there is a terminating \0 at the end
of the buffer, not accounted in the `len' field of the structure.

  A strbuf can be used to generate a string/buffer whose final size is not
really known, and then "strbuf_detach" can be used to get the built buffer,
and keep the wrapping "strbuf" structure usable for further work again.

  Other interesting feature: strbuf_grow(sb, size) ensure that there is
enough allocated space in `sb' to put `size' new octets of data in the
buffer. It helps avoiding reallocating data for nothing when the problem the
strbuf helps to solve has a known typical size.

Signed-off-by: Pierre Habouzit &lt;madcoder@debian.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>convert object type handling from a string to a number</title>
<updated>2007-02-27T09:34:21Z</updated>
<author>
<name>Nicolas Pitre</name>
<email>nico@cam.org</email>
</author>
<published>2007-02-26T19:55:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=21666f1aae4e890d8f50924f9e80763b27e6a45d'/>
<id>urn:sha1:21666f1aae4e890d8f50924f9e80763b27e6a45d</id>
<content type='text'>
We currently have two parallel notation for dealing with object types
in the code: a string and a numerical value.  One of them is obviously
redundent, and the most used one requires more stack space and a bunch
of strcmp() all over the place.

This is an initial step for the removal of the version using a char array
found in object reading code paths.  The patch is unfortunately large but
there is no sane way to split it in smaller parts without breaking the
system.

Signed-off-by: Nicolas Pitre &lt;nico@cam.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
