]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/submodule--helper: add gitdir command
authorAdrian Ratiu <adrian.ratiu@collabora.com>
Sat, 20 Dec 2025 10:15:20 +0000 (12:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 21 Dec 2025 02:36:00 +0000 (11:36 +0900)
commit6ac04cd1665e9048050e62018d2af4eb41cffd9c
tree3e48a27cd48016bcda9f1562e3966076893d8d56
parenta9d503f816d23576f24d99820c15dd1bf89b892e
builtin/submodule--helper: add gitdir command

This exposes the gitdir name computed by submodule_name_to_gitdir()
internally, to make it easier for users and tests to interact with it.

Next commit will add a gitdir configuration, so this helper can also be
used to easily query that config or validate any gitdir path the user
sets (submodule_name_to_git_dir now runs the validation logic, since
our previous commit).

Based-on-patch-by: Brandon Williams <bwilliams.eng@gmail.com>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c