Glen Choo <chooglen@xxxxxxxxxx> writes: > When check_has_commit() is called on a missing submodule, initialization > of the struct repository fails, but it attempts to clear the struct > anyway (which is a fatal error). This bug is masked by its only caller, > submodule_has_commits(), first calling add_submodule_odb() - the latter > fails if the submodule does not exist, making submodule_has_commits() > exit early and not invoke check_has_commit(). This patch looks good, thanks.