]> git.ipfire.org Git - thirdparty/git.git/commit
submodule--helper: refactor resolve_relative_url() helper
authorAtharva Raykar <raykar.ath@gmail.com>
Tue, 10 Aug 2021 11:46:34 +0000 (17:16 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Aug 2021 18:45:11 +0000 (11:45 -0700)
commitab6f23b75129bc20681c0941cdd01d2694bc54f4
tree23a93ee459f04a476d1e8deba36950a5cc64ca58
parent6baf4e4da44e8412d61118c5f35f383b679462ca
submodule--helper: refactor resolve_relative_url() helper

Refactor the helper function to resolve a relative url, by reusing the
existing `compute_submodule_clone_url()` function.

`compute_submodule_clone_url()` performs the same work that
`resolve_relative_url()` is doing, so we eliminate this code repetition
by moving the former function's definition up, and calling it inside
`resolve_relative_url()`.

Signed-off-by: Atharva Raykar <raykar.ath@gmail.com>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Shourya Shukla <periperidip@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c