1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-09 20:17:21 +00:00

Implement git refs API for listing references (branches, tags and other) (#5354)

* Inital routes to git refs api

* Git refs API implementation

* Update swagger

* Fix copyright

* Make swagger happy add basic test

* Fix test

* Fix test again :)
This commit is contained in:
Lauris BH
2018-11-27 23:52:20 +02:00
committed by techknowlogick
parent 294904321c
commit 08bf443016
268 changed files with 48603 additions and 10 deletions

View File

@ -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
}