From: Li Chen Date: Wed, 22 Oct 2025 05:39:31 GMT Subject: [PATCH v5 11/29] rebase: reuse buffer for trailer args Message-ID: <20251022053951.602605-12-me@linux.beauty> In-Reply-To: <20251022053951.602605-1-me@linux.beauty> Reset the reusable buffer before reading trailer arguments in read_basic_state() so the existing allocation can be reused. Signed-off-by: Li Chen --- builtin/rebase.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/rebase.c b/builtin/rebase.c index b0f547ef2b..89ecb84a31 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -508,7 +508,7 @@ static int read_basic_state(struct rebase_options *opts) opts->gpg_sign_opt = xstrdup(buf.buf); } - strbuf_release(&buf); + strbuf_reset(&buf); if (strbuf_read_file(&buf, state_dir_path("trailer", opts), 0) >= 0) { const char *p = buf.buf, *end = buf.buf + buf.len; -- 2.51.0