]> Kevux Git Server - rit/commit
environment: do not use strbuf_split*()
authorJunio C Hamano <gitster@pobox.com>
Thu, 31 Jul 2025 22:54:30 +0000 (15:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 3 Aug 2025 05:44:58 +0000 (22:44 -0700)
commitb894d4481f4068a84323dfc7048f007b3df5234d
treee12aa47fda84b38423c1cb08d1f0b63a0ef0a0a8
parentdcecac2580ef871186fdc4e9efc87815a4ce4c66
environment: do not use strbuf_split*()

environment.c:get_git_namespace() learns the raw namespace from an
environment variable, splits it at "/", and appends them after
"refs/namespaces/"; the reason why it splits first is so that an
empty string resulting from double slashes can be omitted.

The split pieces do not need to be edited in any way, so an array of
strbufs is a wrong data structure to use.  Instead split into a
string list and use the pieces from there.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
environment.c