This is a resend of sb/submodule-recursive-fetch-gets-the-tip, with all feedback addressed. As it took some time, I'll send it without range-diff, but would ask for full review. I plan on resending after the next release as this got delayed quite a bit, which is why I also rebased it to master. Thanks, Stefan Previous round: https://public-inbox.org/git/20181016181327.107186-1-sbeller@xxxxxxxxxx/ Stefan Beller (9): sha1-array: provide oid_array_filter submodule.c: fix indentation submodule.c: sort changed_submodule_names before searching it submodule.c: tighten scope of changed_submodule_names struct submodule: store OIDs in changed_submodule_names repository: repo_submodule_init to take a submodule struct submodule: migrate get_next_submodule to use repository structs submodule.c: fetch in submodules git directory instead of in worktree fetch: try fetching submodules if needed objects were not fetched Documentation/technical/api-oid-array.txt | 5 + builtin/fetch.c | 11 +- builtin/grep.c | 17 +- builtin/ls-files.c | 12 +- builtin/submodule--helper.c | 2 +- repository.c | 27 +- repository.h | 12 +- sha1-array.c | 17 ++ sha1-array.h | 3 + submodule.c | 284 ++++++++++++++++--- t/helper/test-submodule-nested-repo-config.c | 8 +- t/t5526-fetch-submodules.sh | 86 ++++++ 12 files changed, 395 insertions(+), 89 deletions(-) -- 2.20.0.rc1.387.gf8505762e3-goog