diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-14 12:30:19 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-14 12:30:19 +0200 |
commit | 91bf16b2336e6f80f0742be729582fe5fbbada83 (patch) | |
tree | 935a95f72e824543970c8254c39cf0afa22b3410 /storage | |
parent | f826cf9d42cc34e2ae5aaf6ede892ecab9d2f198 (diff) | |
download | go-git-91bf16b2336e6f80f0742be729582fe5fbbada83.tar.gz |
core: removing Object.Content, the Reader should be used always
Diffstat (limited to 'storage')
-rw-r--r-- | storage/filesystem/object_test.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/storage/filesystem/object_test.go b/storage/filesystem/object_test.go index a784525..5c4c7c8 100644 --- a/storage/filesystem/object_test.go +++ b/storage/filesystem/object_test.go @@ -2,6 +2,7 @@ package filesystem import ( "fmt" + "io/ioutil" "os" "reflect" "sort" @@ -195,9 +196,12 @@ func equalsObjects(a, b core.Object) (bool, string, error) { asz, bsz), nil } - ac := a.Content() + r, _ := b.Reader() + ac, _ := ioutil.ReadAll(r) if ac != nil { - bc := b.Content() + r, _ := b.Reader() + bc, _ := ioutil.ReadAll(r) + if !reflect.DeepEqual(ac, bc) { return false, fmt.Sprintf("object contents differ"), nil } |