summaryrefslogtreecommitdiff
path: root/advice.c
diff options
context:
space:
mode:
authorLibravatar Brandon Williams <bmwill@google.com>2017-08-03 11:19:58 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-08-03 13:11:01 -0700
commitff6f1f564c48def1f8e1852826bab58af5044b06 (patch)
treea2ddf3d115dd97abb446a070d8f9c2b70db3fe8f /advice.c
parentsubmodule-config: move submodule-config functions to submodule-config.c (diff)
downloadtgif-ff6f1f564c48def1f8e1852826bab58af5044b06.tar.xz
submodule-config: lazy-load a repository's .gitmodules file
In order to use the submodule-config subsystem, callers first need to initialize it by calling 'repo_read_gitmodules()' or 'gitmodules_config()' (which just redirects to 'repo_read_gitmodules()'). There are a couple of callers who need to load an explicit revision of the repository's .gitmodules file (grep) or need to modify the .gitmodules file so they would need to load it before modify the file (checkout), but the majority of callers are simply reading the .gitmodules file present in the working tree. For the common case it would be nice to avoid the boilerplate of initializing the submodule-config system before using it, so instead let's perform lazy-loading of the submodule-config system. Remove the calls to reading the gitmodules file from ls-files to show that lazy-loading the .gitmodules file works. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'advice.c')
0 files changed, 0 insertions, 0 deletions