summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_initial..side
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2026-07-14 10:45:59 +0200
committerJunio C Hamano <gitster@pobox.com>2026-07-14 09:35:02 -0700
commit7b0203b15c1a15c77436160c58b45bef9b087c08 (patch)
treec8139326c42fe597c1e5d3fe1a2f9de8eca2c319 /t/t4013/diff.diff_initial..side
parente9019fcafe0040228b8631c30f97ae1adb61bcdc (diff)
strbuf: avoid redundant reset in strbuf_getwholeline()
The HAVE_GETDELIM variant of strbuf_getwholeline() calls strbuf_reset() on the strbuf before handing it over to getdelim(3). This is unnecessary: - getdelim(3) doesn't care whether the old buffer contents is NUL-terminated and has no access to ->len, - on success getdelim(3) NUL-terminates the buffer and we set ->len, - on error we either call strbuf_init() or strbuf_reset(). Remove the superfluous preparatory call. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions