summaryrefslogtreecommitdiffstats
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorAdrian Ratiu <adrian.ratiu@collabora.com>2026-01-12 20:46:23 +0200
committerJunio C Hamano <gitster@pobox.com>2026-01-12 11:56:55 -0800
commit05a1cdb5255b2b438e66bdaa91b7b2ce75fbe71b (patch)
tree5fbb979a59dde6dc7c5db28f50aee21d5103d573 /contrib/persistent-https
parentb60f7d890dee571069f9c3c6d44ecaed5c34fa39 (diff)
downloadgit-05a1cdb5255b2b438e66bdaa91b7b2ce75fbe71b.tar.gz
git-05a1cdb5255b2b438e66bdaa91b7b2ce75fbe71b.zip
submodule: always validate gitdirs inside submodule_name_to_gitdir
Move the ad-hoc validation checks sprinkled across the source tree, after calling submodule_name_to_gitdir() into the function proper, which now always validates the gitdir before returning it. This simplifies the API and helps to: 1. Avoid redundant validation calls after submodule_name_to_gitdir(). 2. Avoid the risk of callers forgetting to validate. 3. Ensure gitdir paths provided by users via configs are always valid (config gitdir paths are added in a subsequent commit). The validation function can still be called as many times as needed outside submodule_name_to_gitdir(), for example we keep two calls which are still required, to avoid parallel clone races by re-running the validation in builtin/submodule-helper.c. Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions