mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-18 13:53:42 +00:00
1 parent
f98caa2656
commit
320e9b6057
1274 files changed
+398630
-9
No files matched your search
+20
@@ -0,0 +1,20 @@
|
||||
package filesystem
|
||||
|
||||
import (
|
||||
"gopkg.in/src-d/go-git.v4/plumbing/cache"
|
||||
"gopkg.in/src-d/go-git.v4/storage"
|
||||
"gopkg.in/src-d/go-git.v4/storage/filesystem/dotgit"
|
||||
)
|
||||
|
||||
type ModuleStorage struct {
|
||||
dir *dotgit.DotGit
|
||||
}
|
||||
|
||||
func (s *ModuleStorage) Module(name string) (storage.Storer, error) {
|
||||
fs, err := s.dir.Module(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return NewStorage(fs, cache.NewObjectLRUDefault()), nil
|
||||
}
|
||||
Reference in new issue
Block a user