]> git.ipfire.org Git - thirdparty/git.git/commit
strbuf: use st_add3() in strbuf_grow()
authorRené Scharfe <l.s.r@web.de>
Mon, 18 May 2026 20:25:01 +0000 (22:25 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 May 2026 00:52:22 +0000 (09:52 +0900)
commitc13d0f7bd4e696d5db3345e00f763df23347b6ad
treebd125667c41260e3853f715b2c11fe6f1c9c13e3
parent94f057755b7941b321fd11fec1b2e3ca5313a4e0
strbuf: use st_add3() in strbuf_grow()

Simplify the code by calling st_add3() to do overflow checks instead of
open-coding it.  This changes the error message to include the offending
summands, which can be helpful when tracking down the cause.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
strbuf.c