6
6
"gopkg.in/src-d/go-git.v4/plumbing"
7
7
)
8
8
9
- // DiskObject is an object from the packfile on disk.
10
- type DiskObject struct {
9
+ // FSObject is an object from the packfile on disk.
10
+ type FSObject struct {
11
11
hash plumbing.Hash
12
12
h * ObjectHeader
13
13
offset int64
@@ -16,15 +16,15 @@ type DiskObject struct {
16
16
packfile * Packfile
17
17
}
18
18
19
- // NewDiskObject creates a new disk object.
20
- func NewDiskObject (
19
+ // NewFSObject creates a new disk object.
20
+ func NewFSObject (
21
21
hash plumbing.Hash ,
22
22
finalType plumbing.ObjectType ,
23
23
offset int64 ,
24
24
contentSize int64 ,
25
25
packfile * Packfile ,
26
- ) * DiskObject {
27
- return & DiskObject {
26
+ ) * FSObject {
27
+ return & FSObject {
28
28
hash : hash ,
29
29
offset : offset ,
30
30
size : contentSize ,
@@ -34,31 +34,31 @@ func NewDiskObject(
34
34
}
35
35
36
36
// Reader implements the plumbing.EncodedObject interface.
37
- func (o * DiskObject ) Reader () (io.ReadCloser , error ) {
37
+ func (o * FSObject ) Reader () (io.ReadCloser , error ) {
38
38
return o .packfile .getObjectContent (o .offset )
39
39
}
40
40
41
41
// SetSize implements the plumbing.EncodedObject interface. This method
42
42
// is a noop.
43
- func (o * DiskObject ) SetSize (int64 ) {}
43
+ func (o * FSObject ) SetSize (int64 ) {}
44
44
45
45
// SetType implements the plumbing.EncodedObject interface. This method is
46
46
// a noop.
47
- func (o * DiskObject ) SetType (plumbing.ObjectType ) {}
47
+ func (o * FSObject ) SetType (plumbing.ObjectType ) {}
48
48
49
49
// Hash implements the plumbing.EncodedObject interface.
50
- func (o * DiskObject ) Hash () plumbing.Hash { return o .hash }
50
+ func (o * FSObject ) Hash () plumbing.Hash { return o .hash }
51
51
52
52
// Size implements the plumbing.EncodedObject interface.
53
- func (o * DiskObject ) Size () int64 { return o .size }
53
+ func (o * FSObject ) Size () int64 { return o .size }
54
54
55
55
// Type implements the plumbing.EncodedObject interface.
56
- func (o * DiskObject ) Type () plumbing.ObjectType {
56
+ func (o * FSObject ) Type () plumbing.ObjectType {
57
57
return o .typ
58
58
}
59
59
60
60
// Writer implements the plumbing.EncodedObject interface. This method always
61
61
// returns a nil writer.
62
- func (o * DiskObject ) Writer () (io.WriteCloser , error ) {
62
+ func (o * FSObject ) Writer () (io.WriteCloser , error ) {
63
63
return nil , nil
64
64
}
0 commit comments