<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/strbuf.c, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2026-04-01T17:28:18Z</updated>
<entry>
<title>Merge branch 'vp/http-rate-limit-retries'</title>
<updated>2026-04-01T17:28:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-01T17:28:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0a39ec283cadafeae5f542a26569e4cec6f36fae'/>
<id>urn:sha1:0a39ec283cadafeae5f542a26569e4cec6f36fae</id>
<content type='text'>
The HTTP transport learned to react to "429 Too Many Requests".

* vp/http-rate-limit-retries:
  http: add support for HTTP 429 rate limit retries
  strbuf_attach: fix call sites to pass correct alloc
  strbuf: pass correct alloc to strbuf_attach() in strbuf_reencode()
</content>
</entry>
<entry>
<title>strbuf: pass correct alloc to strbuf_attach() in strbuf_reencode()</title>
<updated>2026-03-17T16:14:19Z</updated>
<author>
<name>Vaidas Pilkauskas</name>
<email>vaidas.pilkauskas@shopify.com</email>
</author>
<published>2026-03-17T13:00:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc6a6cf5eedb19b1b1da92ed2761ff9b1c7da627'/>
<id>urn:sha1:bc6a6cf5eedb19b1b1da92ed2761ff9b1c7da627</id>
<content type='text'>
reencode_string_len() allocates len+1 bytes (including the NUL) and
returns the string length in len. strbuf_reencode() was calling
strbuf_attach(sb, out, len, len), so alloc was one byte too small.

strbuf_attach() then calls strbuf_grow(sb, 0). With alloc &lt; len+1,
ALLOC_GROW always reallocates, so we reallocated immediately after
attach even when the strbuf was not extended further. Pass len+1 as
the alloc argument so the existing buffer is reused and the
reallocation is avoided.

Signed-off-by: Vaidas Pilkauskas &lt;vaidas.pilkauskas@shopify.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>global: constify some pointers that are not written to</title>
<updated>2026-02-06T01:52:49Z</updated>
<author>
<name>Collin Funk</name>
<email>collin.funk1@gmail.com</email>
</author>
<published>2026-02-06T01:46:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4ac4705afa3ab660e206c2b870bfae2ddb647ffa'/>
<id>urn:sha1:4ac4705afa3ab660e206c2b870bfae2ddb647ffa</id>
<content type='text'>
The recent glibc 2.43 release had the following change listed in its
NEWS file:

    For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr,
    strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return
    pointers into their input arrays now have definitions as macros that
    return a pointer to a const-qualified type when the input argument is
    a pointer to a const-qualified type.

When compiling with GCC 15, which defaults to -std=gnu23, this causes
many warnings like this:

    merge-ort.c: In function ‘apply_directory_rename_modifications’:
    merge-ort.c:2734:36: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     2734 |                 char *last_slash = strrchr(cur_path, '/');
          |                                    ^~~~~~~

This patch fixes the more obvious ones by making them const when we do
not write to the returned pointer.

Signed-off-by: Collin Funk &lt;collin.funk1@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/prep-symlink-windows'</title>
<updated>2026-01-21T16:29:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-01-21T16:29:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=39d66ddffd2b1dda275a6dd61df3eebac35fcf8a'/>
<id>urn:sha1:39d66ddffd2b1dda275a6dd61df3eebac35fcf8a</id>
<content type='text'>
Further preparation to upstream symbolic link support on Windows.

* js/prep-symlink-windows:
  trim_last_path_component(): avoid hard-coding the directory separator
  strbuf_readlink(): support link targets that exceed 2*PATH_MAX
  strbuf_readlink(): avoid calling `readlink()` twice in corner-cases
  init: do parse _all_ core.* settings early
  mingw: do resolve symlinks in `getcwd()`
</content>
</entry>
<entry>
<title>strbuf_readlink(): support link targets that exceed 2*PATH_MAX</title>
<updated>2026-01-10T02:28:36Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>Johannes.Schindelin@gmx.de</email>
</author>
<published>2026-01-09T20:05:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=21f368daab677724ca1a200c22d65b64b15117b5'/>
<id>urn:sha1:21f368daab677724ca1a200c22d65b64b15117b5</id>
<content type='text'>
The `strbuf_readlink()` function refuses to read link targets that
exceed 2*PATH_MAX (even if a sufficient size was specified by the
caller).

The reason that that limit is 2*PATH_MAX instead of PATH_MAX is that
the symlink targets do not need to be normalized. After running
`ln -s a/../a/../a/../a/../b c`, the target of the symlink `c` will not
be normalized to `b` but instead be much longer. As such, symlink
targets' lengths can far exceed PATH_MAX.

They are frequently much longer than 2*PATH_MAX on Windows, which
actually supports paths up to 32,767 characters, but sets PATH_MAX to
260 for backwards compatibility. For full details, see
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation

Let's just hard-code the limit used by `strbuf_readlink()` to 32,767 and
make it independent of the current platform's PATH_MAX.

Based-on-a-patch-by: Karsten Blees &lt;karsten.blees@gmail.com&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strbuf_readlink(): avoid calling `readlink()` twice in corner-cases</title>
<updated>2026-01-10T02:28:36Z</updated>
<author>
<name>Karsten Blees</name>
<email>karsten.blees@gmail.com</email>
</author>
<published>2026-01-09T20:05:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0fcbb57f970f318df422ca756a269651885576b9'/>
<id>urn:sha1:0fcbb57f970f318df422ca756a269651885576b9</id>
<content type='text'>
The `strbuf_readlink()` function calls `readlink()`` twice if the hint
argument specifies the exact size of the link target (e.g. by passing
stat.st_size as returned by `lstat()`). This is necessary because
`readlink(..., hint) == hint` could mean that the buffer was too small.

Use `hint + 1` as buffer size to prevent this.

Signed-off-by: Karsten Blees &lt;karsten.blees@gmail.com&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/repo: add inflated object info to structure table</title>
<updated>2025-12-18T00:02:31Z</updated>
<author>
<name>Justin Tobler</name>
<email>jltobler@gmail.com</email>
</author>
<published>2025-12-17T17:54:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4d279ae36b1d0f68c8a7ba9b986ff9690ddc1af9'/>
<id>urn:sha1:4d279ae36b1d0f68c8a7ba9b986ff9690ddc1af9</id>
<content type='text'>
Update the table output format for the git-repo(1) structure command to
begin printing the total inflated object size info by object type. To be
more human-friendly, larger values are scaled down and displayed with
the appropriate unit prefix. Output for the keyvalue and nul formats
remains unchanged.

Signed-off-by: Justin Tobler &lt;jltobler@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/repo: humanise count values in structure output</title>
<updated>2025-12-18T00:02:31Z</updated>
<author>
<name>Justin Tobler</name>
<email>jltobler@gmail.com</email>
</author>
<published>2025-12-17T17:54:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=54731320cc3db337f9a3e3920f707e9de3596c60'/>
<id>urn:sha1:54731320cc3db337f9a3e3920f707e9de3596c60</id>
<content type='text'>
The table output format for the git-repo(1) structure subcommand is used
by default and intended to provide output to users in a human-friendly
manner. When the reference/object count values in a repository are
large, it becomes more cumbersome for users to read the values.

For larger values, update the table output format to instead produce
more human-friendly count values that are scaled down with the
appropriate unit prefix. Output for the keyvalue and nul formats remains
unchanged.

Signed-off-by: Justin Tobler &lt;jltobler@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strbuf: split out logic to humanise byte values</title>
<updated>2025-12-18T00:02:31Z</updated>
<author>
<name>Justin Tobler</name>
<email>jltobler@gmail.com</email>
</author>
<published>2025-12-17T17:53:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce849b1851102d974653701564573798034492d5'/>
<id>urn:sha1:ce849b1851102d974653701564573798034492d5</id>
<content type='text'>
In a subsequent commit, byte size values displayed in table output for
the git-repo(1) "structure" subcommand will be shown in a more
human-readable format with the appropriate unit prefixes. For this
usecase, the downscaled values and unit strings must be handled
separately to ensure proper column alignment.

Split out logic from strbuf_humanise() to downscale byte values and
determine the corresponding unit prefix into a separate humanise_bytes()
function that provides seperate value and unit strings.

Note that the "byte" string in "t/helper/test-simple-ipc.c" is unmarked
for translation here so that it doesn't conflict with the newly defined
plural "byte/bytes" translation and instead uses it.

Signed-off-by: Justin Tobler &lt;jltobler@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strbuf: convert predicates to return bool</title>
<updated>2025-07-16T15:18:06Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2025-07-16T09:38:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f006e0323ee4b407bee3e0ff241d9d3f7a03b66a'/>
<id>urn:sha1:f006e0323ee4b407bee3e0ff241d9d3f7a03b66a</id>
<content type='text'>
Now that the string predicates defined in git-compat-util.h all
return bool let's convert the return type of the string predicates
in strbuf.{c,h} to match them.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
