File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,13 @@ package pack
22
33import (
44 "encoding/binary"
5+ "hash"
56)
67
78// V1 implements IndexVersion for v1 packfiles.
8- type V1 struct {}
9+ type V1 struct {
10+ hash hash.Hash
11+ }
912
1013// Name implements IndexVersion.Name by returning the 20 byte SHA-1 object name
1114// for the given entry at offset "at" in the v1 index file "idx".
Original file line number Diff line number Diff line change @@ -2,10 +2,13 @@ package pack
22
33import (
44 "encoding/binary"
5+ "hash"
56)
67
78// V2 implements IndexVersion for v2 packfiles.
8- type V2 struct {}
9+ type V2 struct {
10+ hash hash.Hash
11+ }
912
1013// Name implements IndexVersion.Name by returning the 20 byte SHA-1 object name
1114// for the given entry at offset "at" in the v2 index file "idx".
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package pack
33import (
44 "compress/zlib"
55 "fmt"
6+ "hash"
67 "io"
78 "io/ioutil"
89)
@@ -18,6 +19,9 @@ type Packfile struct {
1819 // objects in this packfile.
1920 idx * Index
2021
22+ // hash is the hash algorithm used in this pack.
23+ hash hash.Hash
24+
2125 // r is an io.ReaderAt that allows read access to the packfile itself.
2226 r io.ReaderAt
2327}
You can’t perform that action at this time.
0 commit comments