Tags: chooglen/git
Tags
submodule: init from superproject tree when checking for commits To minimize the number of fetches, "fetch --recurse-submodules" checks if the 'changed' commits are already in the submodule, and skips the fetch if the submodule already has all of the commits. To make this work with submodules that are not in the index, we need to teach submodule_has_commits() to init the submodule from a superproject tree instead of reading `.gitmodules` from the filesystem. This does not change the existing behavior because Git still inits the same submodule when checking for commits, just that it uses the `.gitmodules` and path from the super_oid tree. Add super_oid to struct changed_submodule_data and use super_oid when Git calls submodule_has_commits() during "fetch --recurse-submodules". Do not change the submodule_has_commits() call during "push --recurse-submodules". Signed-off-by: Glen Choo <chooglen@google.com>
PreviousNext