fast-import: directly use strbufs for paths
commit5733f894d7e66d0f0fbd29675d8420825ce0c29f
authorThalia Archibald <thalia@archibald.dev>
Sun, 14 Apr 2024 01:11:44 +0000 (14 01:11 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 Apr 2024 17:06:17 +0000 (15 10:06 -0700)
tree2d36688fed30fc94f31a8bfa23cfc557650d3243
parent0df86b66899f9d6f1c09cceb4743c8cef733836a
fast-import: directly use strbufs for paths

Previously, one case would not write the path to the strbuf: when the
path is unquoted and at the end of the string. It was essentially
copy-on-write. However, with the logic simplification of the previous
commit, this case was eliminated and the strbuf is always populated.

Directly use the strbufs now instead of an alias.

Since this already changes all the lines that use the strbufs, rename
them from `uq` to be more descriptive. That they are unquoted is not
their most important property, so name them after what they carry.

Additionally, `file_change_m` no longer needs to copy the path before
reading inline data.

Signed-off-by: Thalia Archibald <thalia@archibald.dev>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fast-import.c