diff --git a/docs/ux-guide.md b/docs/ux-guide.md index d0c1ade..b5e193f 100644 --- a/docs/ux-guide.md +++ b/docs/ux-guide.md @@ -121,7 +121,9 @@ Changes 5 files · 2M 1A 1D 1R · +37 −12 `path branch ↑↓ · n submodules · … · n pin staged · n loading · ` Issue counts are ordered by severity (unpushed, conflict, missing, off pin, -changed), each in its level color. Zero counts are omitted. A detached +changed), each in its level color. Zero counts are omitted. `n loading` +counts only submodules whose status is still being loaded; ones whose load +failed (shown as `error`) are not counted. A detached superproject shows `(detached)` as its branch. `` on the right: diff --git a/internal/submodule/git/provider.go b/internal/submodule/git/provider.go index 3d59601..22bd70d 100644 --- a/internal/submodule/git/provider.go +++ b/internal/submodule/git/provider.go @@ -158,7 +158,7 @@ func status(ctx context.Context, in info) (*submodule.Status, error) { } pin := parseGitlink(out) if pin == "" { - return nil, errors.New("no gitlink in the superproject index") + return nil, errors.New("listed in .gitmodules, but has no gitlink in the superproject index (stale entry?)") } out, _, err = try(ctx, in.superDir, "ls-tree", "HEAD", "--", in.relPath) if err != nil { diff --git a/internal/tui/header/header.go b/internal/tui/header/header.go index 21f5e58..671bbfa 100644 --- a/internal/tui/header/header.go +++ b/internal/tui/header/header.go @@ -42,7 +42,9 @@ func View(t theme.Theme, repo *submodule.Repo, fetch Fetch, spinner string, widt submodule.Walk(repo.Submodules, func(s *submodule.Submodule) { total++ if s.Status == nil { - loading++ + if s.Err == nil { + loading++ + } return } if s.Status.PinStaged {