Files
git/builtin
Ghanshyam Thakkar a70f8f19ad strbuf: introduce strbuf_addstrings() to repeatedly add a string
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 <gitster@pobox.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Co-authored-by: Achu Luma <ach.lumap@gmail.com>
Signed-off-by: Achu Luma <ach.lumap@gmail.com>
Signed-off-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-05-29 09:09:39 -07:00
..
2024-04-22 16:27:43 -07:00
2024-04-05 10:49:49 -07:00
2024-04-05 15:21:14 -07:00
2024-04-05 10:49:49 -07:00
2024-03-28 14:13:50 -07:00
2024-02-13 10:18:50 -08:00
2024-02-12 09:32:41 -08:00
2024-04-09 14:31:45 -07:00
2024-03-28 14:13:50 -07:00
2023-07-06 11:54:48 -07:00
2024-04-01 13:21:34 -07:00
2024-01-08 14:05:15 -08:00
2024-04-05 10:49:49 -07:00
2024-02-26 09:35:40 -08:00
2023-07-06 11:54:48 -07:00
2024-03-28 14:13:50 -07:00
2024-04-05 10:49:49 -07:00
2024-03-07 15:59:41 -08:00
2024-03-28 14:13:50 -07:00
2024-03-28 14:13:50 -07:00
2024-04-05 10:49:49 -07:00
2024-01-18 12:17:41 -08:00