unpack-trees: improve loading of .gitmodules
commit33028713206c3f59709617d8af5ba4212920a5f0
authorBrandon Williams <bmwill@google.com>
Thu, 3 Aug 2017 18:19:59 +0000 (3 11:19 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Aug 2017 20:11:02 +0000 (3 13:11 -0700)
treeeaa8c255df1030785161a89fd391b10afee5c9dd
parentff6f1f564c48def1f8e1852826bab58af5044b06
unpack-trees: improve loading of .gitmodules

When recursing submodules 'check_updates()' needs to have strict control
over the submodule-config subsystem to ensure that the gitmodules file
has been read before checking cache entries which are marked for
removal as well ensuring the proper gitmodules file is read before
updating cache entries.

Because of this let's not rely on callers of 'check_updates()' to read
the gitmodules file before calling 'check_updates()' and handle the
reading explicitly.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
unpack-trees.c