aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/index/encoder.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/format/index/encoder.go')
-rw-r--r--plumbing/format/index/encoder.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/plumbing/format/index/encoder.go b/plumbing/format/index/encoder.go
index 2c94d93..fa2d814 100644
--- a/plumbing/format/index/encoder.go
+++ b/plumbing/format/index/encoder.go
@@ -2,13 +2,12 @@ package index
import (
"bytes"
- "crypto/sha1"
"errors"
- "hash"
"io"
"sort"
"time"
+ "github.com/go-git/go-git/v5/plumbing/hash"
"github.com/go-git/go-git/v5/utils/binary"
)
@@ -29,7 +28,7 @@ type Encoder struct {
// NewEncoder returns a new encoder that writes to w.
func NewEncoder(w io.Writer) *Encoder {
- h := sha1.New()
+ h := hash.New(hash.CryptoType)
mw := io.MultiWriter(w, h)
return &Encoder{mw, h}
}