submodule: make static functions read submodules from commits
commit7c2f8cc58cc3648a0e1e4c76be15a09114b4d9dd
authorGlen Choo <chooglen@google.com>
Tue, 8 Mar 2022 00:14:27 +0000 (7 16:14 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Mar 2022 00:51:03 +0000 (7 16:51 -0800)
treec443bb8426ff7eaf96591b9ee617c1df4ac494ec
parentd1d1572e75edfa901fd6ab836402f57ba2da27b4
submodule: make static functions read submodules from commits

A future commit will teach "fetch --recurse-submodules" to fetch
unpopulated submodules. To prepare for this, teach the necessary static
functions how to read submodules from superproject commits using a
"treeish_name" argument (instead of always reading from the index and
filesystem) but do not actually change where submodules are read from.
Submodules will be read from commits when we fetch unpopulated
submodules.

Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c