]> git.ipfire.org Git - thirdparty/git.git/commit - unpack-trees.c
submodule-config: add skip_if_read option to repo_read_gitmodules()
authorMatheus Tavares <matheus.bernardino@usp.br>
Thu, 16 Jan 2020 02:39:55 +0000 (23:39 -0300)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 Jan 2020 21:52:14 +0000 (13:52 -0800)
commitd7992421e1a0e3ea5f836d8906e0f8b197fb6c1e
tree5c6e3e4f5fa6c4dcedfc23f0537824585e17bc0d
parent1d1729caebd41b340dd8dd61057f613da4df526c
submodule-config: add skip_if_read option to repo_read_gitmodules()

Currently, submodule-config.c doesn't have an externally accessible
function to read gitmodules only if it wasn't already read. But this
exact behavior is internally implemented by gitmodules_read_check(), to
perform a lazy load. Let's merge this function with
repo_read_gitmodules() adding a 'skip_if_read' which allows both
internal and external callers to access this functionality. This
simplifies a little the code. The added option will also be used in
the following patch.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/grep.c
submodule-config.c
submodule-config.h
unpack-trees.c