diff options
| author | René Scharfe <l.s.r@web.de> | 2026-05-15 09:33:53 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-05-16 22:11:07 +0900 |
| commit | 34a891a2d30865316be2628949d4f1b005f65662 (patch) | |
| tree | 3f9f66a294e6b68a04827215db9ba856540eabcc /t/t4013/diff.diff_initial..side | |
| parent | 94f057755b7941b321fd11fec1b2e3ca5313a4e0 (diff) | |
trailer: change strbuf in-place in unfold_value()
Avoid an allocation by doing s/\n\s*/ /g (replacing NL and any following
whitespace with a SP) right in the strbuf instead of copying the result
to a temporary one and swapping them in the end. We can safely do that
because the replacement is never longer than the original string.
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
