All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] strbuf.[ch]: add STRBUF_HINT_SIZE, don't hardcode 8192
@ 2021-07-07 10:38 Ævar Arnfjörð Bjarmason
  2021-07-07 10:38 ` [PATCH 1/3] strbuf.[ch]: add STRBUF_HINT_SIZE macro = 8192 Ævar Arnfjörð Bjarmason
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-07-07 10:38 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Jeff King, Ævar Arnfjörð Bjarmason

A rather trivial cleanup series to avoid hardcoding 8192 in N places
in strbuf.[ch], instead we add a STRBUF_HINT_SIZE macro. Then make
strbuf_fread() take a "hint" instead of "size" (like most similar
functions) so we can pass a size of "0" meaning the default hint to
it.

Ævar Arnfjörð Bjarmason (3):
  strbuf.[ch]: add STRBUF_HINT_SIZE macro = 8192
  strbuf.h API users: don't hardcode 8192, use STRBUF_HINT_SIZE
  strbuf.[ch]: make strbuf_fread() take hint, not size

 builtin/am.c |  4 ++--
 cache-tree.c |  2 +-
 commit.c     |  2 +-
 strbuf.c     |  9 +++++----
 strbuf.h     | 14 +++++++++++++-
 5 files changed, 22 insertions(+), 9 deletions(-)

-- 
2.32.0.636.g43e71d69cff


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-07-12 17:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 10:38 [PATCH 0/3] strbuf.[ch]: add STRBUF_HINT_SIZE, don't hardcode 8192 Ævar Arnfjörð Bjarmason
2021-07-07 10:38 ` [PATCH 1/3] strbuf.[ch]: add STRBUF_HINT_SIZE macro = 8192 Ævar Arnfjörð Bjarmason
2021-07-07 22:33   ` Junio C Hamano
2021-07-07 10:38 ` [PATCH 2/3] strbuf.h API users: don't hardcode 8192, use STRBUF_HINT_SIZE Ævar Arnfjörð Bjarmason
2021-07-07 20:10   ` Eric Sunshine
2021-07-07 22:37   ` Junio C Hamano
2021-07-07 23:09     ` Junio C Hamano
2021-07-07 23:22     ` Randall S. Becker
2021-07-12 17:58     ` Jeff King
2021-07-07 10:38 ` [PATCH 3/3] strbuf.[ch]: make strbuf_fread() take hint, not size Ævar Arnfjörð Bjarmason
2021-07-07 11:47   ` Han-Wen Nienhuys
2021-07-07 21:27     ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.