Fix submodule nil check (#35096)

Fix  #35095
This commit is contained in:
wxiaoguang authored and GitHub committed 2025-07-16 12:07:38 +00:00
1 parent e1e4815a1c
commit fc4cb07beb
3 files changed
+14 -2

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ type CommitInfo struct {
func getCommitInfoSubmoduleFile(repoLink string, entry *TreeEntry, commit *Commit, treePathDir string) (*CommitSubmoduleFile, error) {
fullPath := path.Join(treePathDir, entry.Name())
submodule, err := commit.GetSubModule(fullPath)
if err != nil {
if submodule == nil || err != nil {
return nil, err
}
return NewCommitSubmoduleFile(repoLink, fullPath, submodule.URL, entry.ID.String()), nil