summaryrefslogtreecommitdiff
path: root/builtin/mv.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-08-03 18:19:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-03 20:11:01 (GMT)
commitff6f1f564c48def1f8e1852826bab58af5044b06 (patch)
treea2ddf3d115dd97abb446a070d8f9c2b70db3fe8f /builtin/mv.c
parent1b796ace7b5566d7cd2ed2ee56d3e5b1f7605272 (diff)
downloadgit-ff6f1f564c48def1f8e1852826bab58af5044b06.zip
git-ff6f1f564c48def1f8e1852826bab58af5044b06.tar.gz
git-ff6f1f564c48def1f8e1852826bab58af5044b06.tar.bz2
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 'builtin/mv.c')
0 files changed, 0 insertions, 0 deletions