This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

knotmirror/xrpc: skip blob size check on submodules

Signed-off-by: Seongmin Lee <git@boltless.me>

author
Seongmin Lee
date (Jul 27, 2026, 5:27 AM +0900) commit 0354d5b8 parent e8e27f99 change-id qyplrsqv
+11 -5
+11 -5
knotmirror/xrpc/git_get_entry.go
··· 56 56 writeJson(w, http.StatusNotFound, atclient.ErrorBody{Name: "EntryNotFound", Message: fmt.Sprintf("entry %q not found", path)}) 57 57 return 58 58 } 59 - size, err := gitea.GetBlobSize(ctx, repoPath, entry.Hash) 60 - if err != nil { 61 - l.Error("failed to read blob size", "err", err) 62 - writeJson(w, http.StatusInternalServerError, atclient.ErrorBody{Name: "InternalServerError", Message: "failed to read blob size"}) 63 - return 59 + var size int64 60 + switch entry.Mode { 61 + case filemode.Empty, filemode.Dir, filemode.Submodule: 62 + // no-op 63 + default: 64 + size, err = gitea.GetBlobSize(ctx, repoPath, entry.Hash) 65 + if err != nil { 66 + l.Error("failed to read blob size", "err", err) 67 + writeJson(w, http.StatusInternalServerError, atclient.ErrorBody{Name: "InternalServerError", Message: "failed to read blob size"}) 68 + return 69 + } 64 70 } 65 71 66 72 var outLastCommit *tangled.GitTempDefs_Commit