aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/idxfile/idxfile.go
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2023-04-11 21:00:47 +0100
committerGitHub <noreply@github.com>2023-04-11 21:00:47 +0100
commitd5b1afd3cc786e56a90cec910b79815ed3b23cc7 (patch)
tree4e0b93ea480fdea37761d2e879a073ce6f5c1747 /plumbing/format/idxfile/idxfile.go
parentce62f3e9ff86270538a514a68d3bd5563a733e3b (diff)
parent8e8281008ee98e9864fa9597be3e16aaecdf9891 (diff)
downloadgo-git-d5b1afd3cc786e56a90cec910b79815ed3b23cc7.tar.gz
Merge pull request #707 from pjbgf/experimental-sha256
*: Add support for initializing SHA256 repositories
Diffstat (limited to 'plumbing/format/idxfile/idxfile.go')
-rw-r--r--plumbing/format/idxfile/idxfile.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/plumbing/format/idxfile/idxfile.go b/plumbing/format/idxfile/idxfile.go
index 64dd8dc..9237a74 100644
--- a/plumbing/format/idxfile/idxfile.go
+++ b/plumbing/format/idxfile/idxfile.go
@@ -8,6 +8,7 @@ import (
encbin "encoding/binary"
"github.com/go-git/go-git/v5/plumbing"
+ "github.com/go-git/go-git/v5/plumbing/hash"
)
const (
@@ -53,8 +54,8 @@ type MemoryIndex struct {
Offset32 [][]byte
CRC32 [][]byte
Offset64 []byte
- PackfileChecksum [20]byte
- IdxChecksum [20]byte
+ PackfileChecksum [hash.Size]byte
+ IdxChecksum [hash.Size]byte
offsetHash map[int64]plumbing.Hash
offsetHashIsFull bool