aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clients/common_test.go2
-rw-r--r--examples/fs_implementation/main_test.go2
-rw-r--r--repository.go6
-rw-r--r--repository_test.go6
-rw-r--r--storage/filesystem/internal/gitdir/gitdir.go (renamed from storage/seekable/internal/gitdir/gitdir.go)0
-rw-r--r--storage/filesystem/internal/gitdir/gitdir_test.go (renamed from storage/seekable/internal/gitdir/gitdir_test.go)0
-rw-r--r--storage/filesystem/internal/gitdir/refs.go (renamed from storage/seekable/internal/gitdir/refs.go)0
-rw-r--r--storage/filesystem/internal/index/index.go (renamed from storage/seekable/internal/index/index.go)0
-rw-r--r--storage/filesystem/internal/index/index_test.go (renamed from storage/seekable/internal/index/index_test.go)0
-rw-r--r--storage/filesystem/storage.go (renamed from storage/seekable/storage.go)6
-rw-r--r--storage/filesystem/storage_test.go (renamed from storage/seekable/storage_test.go)22
-rw-r--r--utils/fs/os_test.go2
12 files changed, 23 insertions, 23 deletions
diff --git a/clients/common_test.go b/clients/common_test.go
index 53ae90c..acc8d68 100644
--- a/clients/common_test.go
+++ b/clients/common_test.go
@@ -20,7 +20,7 @@ type SuiteCommon struct {
var _ = Suite(&SuiteCommon{})
-const fixtureTGZ = "../storage/seekable/internal/gitdir/fixtures/spinnaker-gc.tgz"
+const fixtureTGZ = "../storage/filesystem/internal/gitdir/fixtures/spinnaker-gc.tgz"
func (s *SuiteCommon) SetUpSuite(c *C) {
var err error
diff --git a/examples/fs_implementation/main_test.go b/examples/fs_implementation/main_test.go
index 4f138c2..9683b1b 100644
--- a/examples/fs_implementation/main_test.go
+++ b/examples/fs_implementation/main_test.go
@@ -20,7 +20,7 @@ func TestMain(m *testing.M) {
func setUp() {
var err error
- repo, err = tgz.Extract("../../storage/seekable/internal/gitdir/fixtures/spinnaker-gc.tgz")
+ repo, err = tgz.Extract("../../storage/filesystem/internal/gitdir/fixtures/spinnaker-gc.tgz")
if err != nil {
panic(err)
}
diff --git a/repository.go b/repository.go
index 0cd0d35..cab0ada 100644
--- a/repository.go
+++ b/repository.go
@@ -7,8 +7,8 @@ import (
"gopkg.in/src-d/go-git.v4/clients/common"
"gopkg.in/src-d/go-git.v4/core"
"gopkg.in/src-d/go-git.v4/formats/packfile"
+ "gopkg.in/src-d/go-git.v4/storage/filesystem"
"gopkg.in/src-d/go-git.v4/storage/memory"
- "gopkg.in/src-d/go-git.v4/storage/seekable"
"gopkg.in/src-d/go-git.v4/utils/fs"
)
@@ -56,7 +56,7 @@ func NewRepositoryFromFS(fs fs.FS, path string) (*Repository, error) {
repo := NewPlainRepository()
var err error
- repo.Storage, err = seekable.New(fs, path)
+ repo.Storage, err = filesystem.New(fs, path)
return repo, err
}
@@ -239,7 +239,7 @@ func (r *Repository) remoteHead(remote string) (core.Hash, error) {
}
func (r *Repository) localHead() (core.Hash, error) {
- storage, ok := r.Storage.(*seekable.ObjectStorage)
+ storage, ok := r.Storage.(*filesystem.ObjectStorage)
if !ok {
return core.ZeroHash,
fmt.Errorf("cannot retrieve local head: no local data found")
diff --git a/repository_test.go b/repository_test.go
index f2709eb..2d9fd14 100644
--- a/repository_test.go
+++ b/repository_test.go
@@ -6,7 +6,7 @@ import (
"gopkg.in/src-d/go-git.v4/clients/http"
"gopkg.in/src-d/go-git.v4/core"
- "gopkg.in/src-d/go-git.v4/storage/seekable"
+ "gopkg.in/src-d/go-git.v4/storage/filesystem"
"gopkg.in/src-d/go-git.v4/utils/fs"
"github.com/alcortesm/tgz"
@@ -20,7 +20,7 @@ var dirFixturesInit = [...]struct {
}{
{
name: "binrels",
- tgz: "storage/seekable/internal/gitdir/fixtures/alcortesm-binary-relations.tgz",
+ tgz: "storage/filesystem/internal/gitdir/fixtures/alcortesm-binary-relations.tgz",
head: "c44b5176e99085c8fe36fa27b045590a7b9d34c9",
},
}
@@ -87,7 +87,7 @@ func (s *SuiteRepository) TestNewRepositoryFromFS(c *C) {
c.Assert(err, ErrorMatches, `unable to find remote "origin"`)
c.Assert(repo.Storage, NotNil, com)
- c.Assert(repo.Storage, FitsTypeOf, &seekable.ObjectStorage{}, com)
+ c.Assert(repo.Storage, FitsTypeOf, &filesystem.ObjectStorage{}, com)
}
}
diff --git a/storage/seekable/internal/gitdir/gitdir.go b/storage/filesystem/internal/gitdir/gitdir.go
index b5497b8..b5497b8 100644
--- a/storage/seekable/internal/gitdir/gitdir.go
+++ b/storage/filesystem/internal/gitdir/gitdir.go
diff --git a/storage/seekable/internal/gitdir/gitdir_test.go b/storage/filesystem/internal/gitdir/gitdir_test.go
index a02e0f4..a02e0f4 100644
--- a/storage/seekable/internal/gitdir/gitdir_test.go
+++ b/storage/filesystem/internal/gitdir/gitdir_test.go
diff --git a/storage/seekable/internal/gitdir/refs.go b/storage/filesystem/internal/gitdir/refs.go
index cfd42fd..cfd42fd 100644
--- a/storage/seekable/internal/gitdir/refs.go
+++ b/storage/filesystem/internal/gitdir/refs.go
diff --git a/storage/seekable/internal/index/index.go b/storage/filesystem/internal/index/index.go
index 737aca6..737aca6 100644
--- a/storage/seekable/internal/index/index.go
+++ b/storage/filesystem/internal/index/index.go
diff --git a/storage/seekable/internal/index/index_test.go b/storage/filesystem/internal/index/index_test.go
index 4ddfc25..4ddfc25 100644
--- a/storage/seekable/internal/index/index_test.go
+++ b/storage/filesystem/internal/index/index_test.go
diff --git a/storage/seekable/storage.go b/storage/filesystem/storage.go
index e056c54..427de94 100644
--- a/storage/seekable/storage.go
+++ b/storage/filesystem/storage.go
@@ -1,4 +1,4 @@
-package seekable
+package filesystem
import (
"fmt"
@@ -7,8 +7,8 @@ import (
"gopkg.in/src-d/go-git.v4/core"
"gopkg.in/src-d/go-git.v4/formats/packfile"
- "gopkg.in/src-d/go-git.v4/storage/seekable/internal/gitdir"
- "gopkg.in/src-d/go-git.v4/storage/seekable/internal/index"
+ "gopkg.in/src-d/go-git.v4/storage/filesystem/internal/gitdir"
+ "gopkg.in/src-d/go-git.v4/storage/filesystem/internal/index"
"gopkg.in/src-d/go-git.v4/utils/fs"
)
diff --git a/storage/seekable/storage_test.go b/storage/filesystem/storage_test.go
index bd12ed1..035a206 100644
--- a/storage/seekable/storage_test.go
+++ b/storage/filesystem/storage_test.go
@@ -1,4 +1,4 @@
-package seekable_test
+package filesystem_test
import (
"fmt"
@@ -9,9 +9,9 @@ import (
"gopkg.in/src-d/go-git.v4/core"
"gopkg.in/src-d/go-git.v4/formats/packfile"
+ "gopkg.in/src-d/go-git.v4/storage/filesystem"
+ "gopkg.in/src-d/go-git.v4/storage/filesystem/internal/gitdir"
"gopkg.in/src-d/go-git.v4/storage/memory"
- "gopkg.in/src-d/go-git.v4/storage/seekable"
- "gopkg.in/src-d/go-git.v4/storage/seekable/internal/gitdir"
"gopkg.in/src-d/go-git.v4/utils/fs"
"github.com/alcortesm/tgz"
@@ -67,7 +67,7 @@ func (s *FsSuite) TearDownSuite(c *C) {
func (s *FsSuite) TestNewErrorNotFound(c *C) {
fs := fs.NewOS()
- _, err := seekable.New(fs, "not_found/.git")
+ _, err := filesystem.New(fs, "not_found/.git")
c.Assert(err, Equals, gitdir.ErrNotFound)
}
@@ -77,7 +77,7 @@ func (s *FsSuite) TestHashNotFound(c *C) {
fs := fs.NewOS()
gitPath := fs.Join(path, ".git/")
- sto, err := seekable.New(fs, gitPath)
+ sto, err := filesystem.New(fs, gitPath)
c.Assert(err, IsNil)
_, err = sto.Get(core.ZeroHash)
@@ -100,10 +100,10 @@ func (s *FsSuite) TestGetCompareWithMemoryStorage(c *C) {
memSto, err := memStorageFromGitDir(fs, gitPath)
c.Assert(err, IsNil, com)
- seekableSto, err := seekable.New(fs, gitPath)
+ filesystemSto, err := filesystem.New(fs, gitPath)
c.Assert(err, IsNil, com)
- equal, reason, err := equalsStorages(memSto, seekableSto)
+ equal, reason, err := equalsStorages(memSto, filesystemSto)
c.Assert(err, IsNil, com)
c.Assert(equal, Equals, true,
Commentf("%s - %s\n", com.CheckCommentString(), reason))
@@ -227,7 +227,7 @@ func (s *FsSuite) TestIterCompareWithMemoryStorage(c *C) {
memSto, err := memStorageFromDirPath(fs, gitPath)
c.Assert(err, IsNil, com)
- seekableSto, err := seekable.New(fs, gitPath)
+ filesystemSto, err := filesystem.New(fs, gitPath)
c.Assert(err, IsNil, com)
for _, typ := range [...]core.ObjectType{
@@ -240,11 +240,11 @@ func (s *FsSuite) TestIterCompareWithMemoryStorage(c *C) {
memObjs, err := iterToSortedSlice(memSto, typ)
c.Assert(err, IsNil, com)
- seekableObjs, err := iterToSortedSlice(seekableSto, typ)
+ filesystemObjs, err := iterToSortedSlice(filesystemSto, typ)
c.Assert(err, IsNil, com)
for i, o := range memObjs {
- c.Assert(seekableObjs[i].Hash(), Equals, o.Hash(), com)
+ c.Assert(filesystemObjs[i].Hash(), Equals, o.Hash(), com)
}
}
}
@@ -318,7 +318,7 @@ func (s *FsSuite) TestSet(c *C) {
fs := fs.NewOS()
gitPath := fs.Join(path, ".git/")
- sto, err := seekable.New(fs, gitPath)
+ sto, err := filesystem.New(fs, gitPath)
c.Assert(err, IsNil)
_, err = sto.Set(&core.MemoryObject{})
diff --git a/utils/fs/os_test.go b/utils/fs/os_test.go
index 84fe895..a2a3066 100644
--- a/utils/fs/os_test.go
+++ b/utils/fs/os_test.go
@@ -18,7 +18,7 @@ type FSImplSuite struct {
var _ = Suite(&FSImplSuite{})
func (s *FSImplSuite) SetUpSuite(c *C) {
- dir, err := tgz.Extract("../../storage/seekable/internal/gitdir/fixtures/spinnaker-gc.tgz")
+ dir, err := tgz.Extract("../../storage/filesystem/internal/gitdir/fixtures/spinnaker-gc.tgz")
c.Assert(err, IsNil)
s.dir = dir
}