Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/buger/jsonparser v1.1.1
github.com/cosmos/cosmos-sdk v0.46.1
github.com/gitopia/gitopia v1.0.0-rc.2
github.com/gitopia/go-git/v5 v5.4.3-0.20211224112515-b2efd9bec92c
github.com/gitopia/go-git/v5 v5.4.3-0.20221005131752-a112ac2d1101
github.com/go-git/go-billy/v5 v5.3.1
github.com/ignite/cli v0.24.0
github.com/libgit2/git2go/v33 v33.0.4
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,8 @@ github.com/gitopia/gitopia v1.0.0-rc.2 h1:6Nnix267uq935TL/ewCC7x71gctrzsh207Tdg9
github.com/gitopia/gitopia v1.0.0-rc.2/go.mod h1:j3lAdoRoKZCFA3V4c5v8lPAab4pDgXQcKHbPJkjeMHA=
github.com/gitopia/go-git/v5 v5.4.3-0.20211224112515-b2efd9bec92c h1:xqrIU2JrAXwioLz+mKxn3j36C/akB1+SuAqXNtyddRU=
github.com/gitopia/go-git/v5 v5.4.3-0.20211224112515-b2efd9bec92c/go.mod h1:+4EawsfpYlHKlmdvSoEYTrRZowCNR8ZhdRU8noDeemI=
github.com/gitopia/go-git/v5 v5.4.3-0.20221005131752-a112ac2d1101 h1:OTY2An/KwpoEn4qq8xHmM62MkwqGYh54Q7R7EiusdHo=
github.com/gitopia/go-git/v5 v5.4.3-0.20221005131752-a112ac2d1101/go.mod h1:URjy4gSDwC2xvvUyqYJdH0GWmvrmyzvIBwqlMiodPsU=
github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0=
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
Expand Down Expand Up @@ -2518,6 +2520,8 @@ github.com/xanzy/go-gitlab v0.32.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfD
github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
github.com/xanzy/ssh-agent v0.3.1 h1:AmzO1SSWxw73zxFZPRwaMN1MohDw8UyHnmuxyceTEGo=
github.com/xanzy/ssh-agent v0.3.1/go.mod h1:QIE4lCeL7nkC25x+yA3LBIYfwCc1TFziCtG7cBAac6w=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
Expand Down
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const (
AccountPubKeyPrefix = AccountAddressPrefix + sdk.PrefixPublic
)

const LARGE_OBJECT_THRESHOLD int64 = 1024 * 1024

type SaveToArweavePostBody struct {
RepositoryID uint64 `json:"repository_id"`
RemoteRefName string `json:"remote_ref_name"`
Expand Down Expand Up @@ -1009,7 +1011,7 @@ func (s *Server) getInfoRefs(_ string, w http.ResponseWriter, r *Request) {
return
}
}
storage := filesystem.NewStorageWithOptions(fs, cache.NewObjectLRUDefault(), filesystem.Options{KeepDescriptors: true})
storage := filesystem.NewStorageWithOptions(fs, cache.NewObjectLRUDefault(), filesystem.Options{KeepDescriptors: true, LargeObjectThreshold: LARGE_OBJECT_THRESHOLD})
ep, _ := transport.NewEndpoint(r.RepoPath)
loader := server.MapLoader{}
loader[ep.String()] = storage
Expand Down Expand Up @@ -1104,7 +1106,7 @@ func (s *Server) postRPC(rpc string, w http.ResponseWriter, r *Request) {
return
}
}
storage := filesystem.NewStorageWithOptions(fs, cache.NewObjectLRUDefault(), filesystem.Options{KeepDescriptors: true})
storage := filesystem.NewStorageWithOptions(fs, cache.NewObjectLRUDefault(), filesystem.Options{KeepDescriptors: true, LargeObjectThreshold: LARGE_OBJECT_THRESHOLD})
ep, _ := transport.NewEndpoint(r.RepoPath)
loader := server.MapLoader{}
loader[ep.String()] = storage
Expand Down