<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/strbuf.h, branch v2.50.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.50.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.50.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-01-13T20:55:26Z</updated>
<entry>
<title>Sync with Git 2.47.2</title>
<updated>2025-01-13T20:55:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-01-13T20:55:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=65faad6d841c29d4545e9cf3676d75f4e6e4872c'/>
<id>urn:sha1:65faad6d841c29d4545e9cf3676d75f4e6e4872c</id>
<content type='text'>
Git 2.47.2

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE4fA2sf7nIh/HeOzvsLXohpav5ssFAmdkT1sACgkQsLXohpav
# 5svdhRAAq0WoZIg+33vYNNVSTm3Ux9RJslmXs3lQuhuUJ61hK/28drSLU29GH7x7
# 3nmmjp1cegnXRVLBAfoYDdzPprNNrQFQEHQEzgG/GDZw0OXn+WTZuNyrrUYoa+sd
# QSLlElRj2qrpHIMOsMIBKBSNB+qjJHOMGdxcBAS768TfnQpGIpc1KJa24TxsVBzC
# ScP4uvrFfPyQrqFUgiUhCeqLnO/6T5i/QAn/8cS5a1+zor5ZHSlw28TZTOxN2odo
# Rulp/FtehiDEzmRowgD3M4fImAPY6Ib6VORCYASqpJFFla30tu2bQqEi6raOMTec
# hg5Ibkmj6fHFONaYvoTMRkYHmtUnNgIPU/CYPwswNk8w1+PPQfJ+TYjBXOQgdTLW
# F0azHBHh7NRmEHVydiF9CqjgNVRzjO4IEZfGqXNFPPMvR6UUzDaIkrpYbwXBFMin
# GNPV3QISeXj9ROjJoCv0nclXETwWemykjZlD6b5krXn5TaJlFb+69qJvXrCLq5WY
# EoevSqKkB9HVK9si7P8Sh1cPGOr3kfiFPmMNKFVI8l0+iDFgBywOomWNS/JEzqu1
# nN142DKdL1W/rkeMUhbX2h11CZNvHKIOy3iaA4MTOing8/eMzyUUQ73Ck7odYs4f
# rZ0tTXKJhxojPvBpTxYe9SxM0bDLREiOv0zX76+sIuhbAQCmk0o=
# =MNNf
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 19 Dec 2024 08:52:43 AM PST
# gpg:                using RSA key E1F036B1FEE7221FC778ECEFB0B5E88696AFE6CB
# gpg: Good signature from "Junio C Hamano &lt;gitster@pobox.com&gt;" [ultimate]
# gpg:                 aka "Junio C Hamano &lt;junio@pobox.com&gt;" [ultimate]
# gpg:                 aka "Junio C Hamano &lt;jch@google.com&gt;" [ultimate]

* tag 'v2.47.2':
  Git 2.47.2
  Git 2.46.3
  Git 2.45.3
  Git 2.44.3
  Git 2.43.6
  Git 2.42.4
  Git 2.41.3
  Git 2.40.4
  credential: disallow Carriage Returns in the protocol by default
  credential: sanitize the user prompt
  credential_format(): also encode &lt;host&gt;[:&lt;port&gt;]
  t7300: work around platform-specific behaviour with long paths on MinGW
  compat/regex: fix argument order to calloc(3)
  mingw: drop bogus (and unneeded) declaration of `_pgmptr`
  ci: remove 'Upload failed tests' directories' step from linux32 jobs
</content>
</entry>
<entry>
<title>refs: move ref name helpers around</title>
<updated>2024-12-03T03:38:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-12-03T02:32:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5bcbde9e49c14f4e47a0ed5fc60470f3d4447efd'/>
<id>urn:sha1:5bcbde9e49c14f4e47a0ed5fc60470f3d4447efd</id>
<content type='text'>
strbuf_branchname(), strbuf_check_{branch,tag}_ref() are helper
functions to deal with branch and tag names, and the fact that they
happen to use strbuf to hold the name of a branch or a tag is not
essential.  These functions fit better in the refs API than strbuf
API, the latter of which is about string manipulations.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Sync with 2.45.3</title>
<updated>2024-11-26T21:15:01Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-30T00:03:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=67809f7c4c654e0f7c4fefff3b46451e217a0294'/>
<id>urn:sha1:67809f7c4c654e0f7c4fefff3b46451e217a0294</id>
<content type='text'>
* maint-2.45:
  Git 2.45.3
  Git 2.44.3
  Git 2.43.6
  Git 2.42.4
  Git 2.41.3
  Git 2.40.4
  credential: disallow Carriage Returns in the protocol by default
  credential: sanitize the user prompt
  credential_format(): also encode &lt;host&gt;[:&lt;port&gt;]
  t7300: work around platform-specific behaviour with long paths on MinGW
  compat/regex: fix argument order to calloc(3)
  mingw: drop bogus (and unneeded) declaration of `_pgmptr`
  ci: remove 'Upload failed tests' directories' step from linux32 jobs
</content>
</entry>
<entry>
<title>Sync with 2.44.3</title>
<updated>2024-11-26T21:15:00Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-29T23:56:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=99cb64c31ab06352feecbb7a005a32339205a344'/>
<id>urn:sha1:99cb64c31ab06352feecbb7a005a32339205a344</id>
<content type='text'>
* maint-2.44:
  Git 2.44.3
  Git 2.43.6
  Git 2.42.4
  Git 2.41.3
  Git 2.40.4
  credential: disallow Carriage Returns in the protocol by default
  credential: sanitize the user prompt
  credential_format(): also encode &lt;host&gt;[:&lt;port&gt;]
  t7300: work around platform-specific behaviour with long paths on MinGW
  compat/regex: fix argument order to calloc(3)
  mingw: drop bogus (and unneeded) declaration of `_pgmptr`
  ci: remove 'Upload failed tests' directories' step from linux32 jobs
</content>
</entry>
<entry>
<title>Sync with 2.42.4</title>
<updated>2024-11-26T21:14:59Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-29T23:52:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c39c2d29e62d5bd13f390ca20f6e756aced681b1'/>
<id>urn:sha1:c39c2d29e62d5bd13f390ca20f6e756aced681b1</id>
<content type='text'>
* maint-2.42:
  Git 2.42.4
  Git 2.41.3
  Git 2.40.4
  credential: disallow Carriage Returns in the protocol by default
  credential: sanitize the user prompt
  credential_format(): also encode &lt;host&gt;[:&lt;port&gt;]
  t7300: work around platform-specific behaviour with long paths on MinGW
  compat/regex: fix argument order to calloc(3)
  mingw: drop bogus (and unneeded) declaration of `_pgmptr`
  ci: remove 'Upload failed tests' directories' step from linux32 jobs
</content>
</entry>
<entry>
<title>Sync with 2.41.3</title>
<updated>2024-11-26T21:14:58Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-29T23:39:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=102e0e6daa920a811890a612578a7723335b1f77'/>
<id>urn:sha1:102e0e6daa920a811890a612578a7723335b1f77</id>
<content type='text'>
* maint-2.41:
  Git 2.41.3
  Git 2.40.4
  credential: disallow Carriage Returns in the protocol by default
  credential: sanitize the user prompt
  credential_format(): also encode &lt;host&gt;[:&lt;port&gt;]
  t7300: work around platform-specific behaviour with long paths on MinGW
  compat/regex: fix argument order to calloc(3)
  mingw: drop bogus (and unneeded) declaration of `_pgmptr`
  ci: remove 'Upload failed tests' directories' step from linux32 jobs
</content>
</entry>
<entry>
<title>Sync with 2.40.4</title>
<updated>2024-11-26T21:14:57Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-29T23:27:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=676cddebf94fab8defe704b2f58c5b59912bb40c'/>
<id>urn:sha1:676cddebf94fab8defe704b2f58c5b59912bb40c</id>
<content type='text'>
* maint-2.40:
  Git 2.40.4
  credential: disallow Carriage Returns in the protocol by default
  credential: sanitize the user prompt
  credential_format(): also encode &lt;host&gt;[:&lt;port&gt;]
  t7300: work around platform-specific behaviour with long paths on MinGW
  compat/regex: fix argument order to calloc(3)
  mingw: drop bogus (and unneeded) declaration of `_pgmptr`
  ci: remove 'Upload failed tests' directories' step from linux32 jobs
</content>
</entry>
<entry>
<title>credential_format(): also encode &lt;host&gt;[:&lt;port&gt;]</title>
<updated>2024-11-26T19:24:00Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-11-07T07:57:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c903985bf7e772e2d08275c1a95c8a55ab011577'/>
<id>urn:sha1:c903985bf7e772e2d08275c1a95c8a55ab011577</id>
<content type='text'>
An upcoming change wants to sanitize the credential password prompt
where a URL is displayed that may potentially come from a `.gitmodules`
file. To this end, the `credential_format()` function is employed.

To sanitize the host name (and optional port) part of the URL, we need a
new mode of the `strbuf_add_percentencode()` function because the
current mode is both too strict and too lenient: too strict because it
encodes `:`, `[` and `]` (which should be left unencoded in
`&lt;host&gt;:&lt;port&gt;` and in IPv6 addresses), and too lenient because it does
not encode invalid host name characters `/`, `_` and `~`.

So let's introduce and use a new mode specifically to encode the host
name and optional port part of a URI, leaving alpha-numerical
characters, periods, colons and brackets alone and encoding all others.

This only leads to a change of behavior for URLs that contain invalid
host names.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>strbuf: introduce strbuf_addstrings() to repeatedly add a string</title>
<updated>2024-05-29T16:09:39Z</updated>
<author>
<name>Ghanshyam Thakkar</name>
<email>shyamthakkar001@gmail.com</email>
</author>
<published>2024-05-29T08:00:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a70f8f19ad2a147a5bfe764fb99379b8f6cb50a5'/>
<id>urn:sha1:a70f8f19ad2a147a5bfe764fb99379b8f6cb50a5</id>
<content type='text'>
In a following commit we are going to port code from
"t/helper/test-sha256.c", t/helper/test-hash.c and "t/t0015-hash.sh" to
a new "t/unit-tests/t-hash.c" file using the recently added unit test
framework.

To port code like: perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;"
we are going to need a new strbuf_addstrings() function that repeatedly
adds the same string a number of times to a buffer.

Such a strbuf_addstrings() function would already be useful in
"json-writer.c" and "builtin/submodule-helper.c" as both of these files
already have code that repeatedly adds the same string. So let's
introduce such a strbuf_addstrings() function in "strbuf.{c,h}" and use
it in both "json-writer.c" and "builtin/submodule-helper.c".

We use the "strbuf_addstrings" name as this way strbuf_addstr() and
strbuf_addstrings() would be similar for strings as strbuf_addch() and
strbuf_addchars() for characters.

Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Mentored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Mentored-by: Kaartic Sivaraam &lt;kaartic.sivaraam@gmail.com&gt;
Co-authored-by: Achu Luma &lt;ach.lumap@gmail.com&gt;
Signed-off-by: Achu Luma &lt;ach.lumap@gmail.com&gt;
Signed-off-by: Ghanshyam Thakkar &lt;shyamthakkar001@gmail.com&gt;
Acked-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/core-comment-string'</title>
<updated>2024-04-05T17:49:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-04-05T17:49:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dce1e0b6daaa872a3b88724d9aa1b087c95e8754'/>
<id>urn:sha1:dce1e0b6daaa872a3b88724d9aa1b087c95e8754</id>
<content type='text'>
core.commentChar used to be limited to a single byte, but has been
updated to allow an arbitrary multi-byte sequence.

* jk/core-comment-string:
  config: add core.commentString
  config: allow multi-byte core.commentChar
  environment: drop comment_line_char compatibility macro
  wt-status: drop custom comment-char stringification
  sequencer: handle multi-byte comment characters when writing todo list
  find multi-byte comment chars in unterminated buffers
  find multi-byte comment chars in NUL-terminated strings
  prefer comment_line_str to comment_line_char for printing
  strbuf: accept a comment string for strbuf_add_commented_lines()
  strbuf: accept a comment string for strbuf_commented_addf()
  strbuf: accept a comment string for strbuf_stripspace()
  environment: store comment_line_char as a string
  strbuf: avoid shadowing global comment_line_char name
  commit: refactor base-case of adjust_comment_line_char()
  strbuf: avoid static variables in strbuf_add_commented_lines()
  strbuf: simplify comment-handling in add_lines() helper
  config: forbid newline as core.commentChar
</content>
</entry>
</feed>
