]> git.ipfire.org Git - thirdparty/git.git/commit - remote.c
remote: move relative_url()
authorDerrick Stolee <derrickstolee@github.com>
Mon, 16 May 2022 20:11:03 +0000 (20:11 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 May 2022 22:02:10 +0000 (15:02 -0700)
commit1d04e719e7bda885991cd4566a5bb6f6565fa106
tree79d5445b183df056ca991b9b07f89696cbd4ebb0
parentc1d024b84378d099f6ff9bb74e442d17587f3081
remote: move relative_url()

This method was initially written in 63e95beb0 (submodule: port
resolve_relative_url from shell to C, 2016-05-15). As we will need
similar functionality in the bundle URI feature, extract this to be
available in remote.h.

The code is almost exactly the same, except for the following trivial
differences:

 * Fix whitespace and wrapping issues with the prototype and argument
   lists.

 * Let's call starts_with_dot_{,dot_}slash_native() instead of the
   functionally identical "starts_with_dot_{,dot_}slash()" wrappers
   "builtin/submodule--helper.c".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c
remote.c
remote.h