From: Jonathan Tan Date: Tue, 15 Feb 2022 22:04:32 GMT Subject: Re: [PATCH v2 9/9] submodule: fix latent check_has_commit() bug Message-ID: <20220215220432.1634706-1-jonathantanmy@google.com> In-Reply-To: <20220215172318.73533-10-chooglen@google.com> Glen Choo 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.