Monorepo for Tangled tangled.org

appview/repo: avoid extra xrpc call on empty repo #1184

merged opened by boltless.me targeting master from sl/knotmirror
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3mhgsd4w2do22
+8 -5
Diff #1
+8 -5
appview/repo/index.go
··· 112 112 l.Error("failed to GetVerifiedObjectCommits", "err", err) 113 113 } 114 114 115 - // TODO: a bit dirty 116 - languageInfo, err := rp.getLanguageInfo(r.Context(), l, f, result.Ref, ref == "") 117 - if err != nil { 118 - l.Warn("failed to compute language percentages", "err", err) 119 - // non-fatal 115 + var languageInfo []types.RepoLanguageDetails 116 + if !result.IsEmpty { 117 + // TODO: a bit dirty 118 + languageInfo, err = rp.getLanguageInfo(r.Context(), l, f, result.Ref, ref == "") 119 + if err != nil { 120 + l.Warn("failed to compute language percentages", "err", err) 121 + // non-fatal 122 + } 120 123 } 121 124 122 125 var shas []string

History

3 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
appview/repo: avoid extra xrpc call on empty repo
2/3 timeout, 1/3 success
expand
expand 0 comments
pull request successfully merged
1 commit
expand
appview/repo: avoid extra xrpc call on empty repo
expand 0 comments
1 commit
expand
appview/repo: avoid extra xrpc call on empty repo
expand 0 comments