From 7f9509a611f7bd3bba64aacbb78b9c00137bb144 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Tue, 14 Feb 2023 14:35:55 +0800 Subject: [PATCH] fix: be tolerant to implicit submodules (#90) --- tree_entry.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tree_entry.go b/tree_entry.go index cac87642..8fdf251a 100644 --- a/tree_entry.go +++ b/tree_entry.go @@ -243,10 +243,10 @@ func (es Entries) CommitsInfo(commit *Commit, opts ...CommitsInfoOptions) ([]*En // Get extra information for submodules if e.IsCommit() { + // Be tolerant to implicit submodules info.Submodule, err = commit.Submodule(epath) if err != nil { - setError(fmt.Errorf("get submodule %q: %v", epath, err)) - return + info.Submodule = &Submodule{Name: epath} } }