Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

utils: fs, new memory filesystem #108

Merged
merged 3 commits into from
Nov 4, 2016
Merged
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 fixtures/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (f *Fixture) DotGit() fs.Filesystem {
}

folders = append(folders, path)
return osfs.NewOS(path)
return osfs.New(path)
}

type Fixtures []*Fixture
Expand Down
2 changes: 1 addition & 1 deletion remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (s *RemoteSuite) TestFetchObjectStorageWriter(c *C) {
defer os.RemoveAll(dir) // clean up

var sto Storage
sto, err = filesystem.NewStorage(osfs.NewOS(dir))
sto, err = filesystem.NewStorage(osfs.New(dir))
c.Assert(err, IsNil)

r := newRemote(sto, &config.RemoteConfig{Name: "foo", URL: RepositoryFixture})
Expand Down
2 changes: 1 addition & 1 deletion repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func NewMemoryRepository() *Repository {
// based on a fs.OS, if you want to use a custom one you need to use the function
// NewRepository and build you filesystem.Storage
func NewFilesystemRepository(path string) (*Repository, error) {
s, err := filesystem.NewStorage(osfs.NewOS(path))
s, err := filesystem.NewStorage(osfs.New(path))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion storage/filesystem/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (s *ConfigSuite) SetUpTest(c *C) {
tmp, err := ioutil.TempDir("", "go-git-filestystem-config")
c.Assert(err, IsNil)

s.dir = dotgit.New(os.NewOS(tmp))
s.dir = dotgit.New(os.New(tmp))
s.path = tmp
}

Expand Down
4 changes: 2 additions & 2 deletions storage/filesystem/internal/dotgit/dotgit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (s *SuiteDotGit) TestSetRefs(c *C) {
c.Assert(err, IsNil)
defer os.RemoveAll(tmp)

fs := osfs.NewOS(tmp)
fs := osfs.New(tmp)
dir := New(fs)

err = dir.SetRef(core.NewReferenceFromStrings(
Expand Down Expand Up @@ -164,7 +164,7 @@ func (s *SuiteDotGit) TestNewObject(c *C) {
c.Assert(err, IsNil)
defer os.RemoveAll(tmp)

fs := osfs.NewOS(tmp)
fs := osfs.New(tmp)
dir := New(fs)
w, err := dir.NewObject()
c.Assert(err, IsNil)
Expand Down
2 changes: 1 addition & 1 deletion storage/filesystem/internal/dotgit/writers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (s *SuiteDotGit) TestNewObjectPack(c *C) {

defer os.RemoveAll(dir)

fs := osfs.NewOS(dir)
fs := osfs.New(dir)
dot := New(fs)

w, err := dot.NewObjectPack()
Expand Down
2 changes: 1 addition & 1 deletion utils/binary/read_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

. "gopkg.in/check.v1"
"gopkg.in/src-d/go-git.v3/core"
"gopkg.in/src-d/go-git.v4/core"
)

func Test(t *testing.T) { TestingT(t) }
Expand Down
Loading