]> git.ipfire.org Git - thirdparty/git.git/commit
ls-tree: make "line_termination" less generic
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 12 Jan 2023 09:11:33 +0000 (17:11 +0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Jan 2023 23:09:23 +0000 (15:09 -0800)
commite6c75d8dd7625e47e767b6f3c38b83827639e2f7
tree11f40d76493c36447a88751b1a978bd7a6bd161c
parent65d1f6c9fa780eab5af6883e309637bddc63d75d
ls-tree: make "line_termination" less generic

The "ls-tree" command isn't capable of ending "lines" with anything
except '\n' or '\0', and in the latter case we can avoid calling
write_name_quoted_relative() entirely. Let's do that, less for
optimization and more for clarity, the write_name_quoted_relative()
API itself does much the same thing.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Teng Long <dyroneteng@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/ls-tree.c