mirror of
https://github.com/git/git.git
synced 2025-12-18 12:00:25 +01:00
The strbuf_parent_directory() method was added as a static method in contrib/scalar byd0feac4e8c(scalar: 'register' sets recommended config and starts maintenance, 2021-12-03) and then removed in65f6a9eb0b(scalar: constrain enlistment search, 2022-08-18), but now there is a need for a similar method in the bundle URI feature. Re-add the method, this time in strbuf.c, but with a new name: strbuf_strip_file_from_path(). The method requirements are slightly modified to allow a trailing slash, in which case nothing is done, which makes the name change valuable. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
24 KiB
24 KiB