Skip to content

Commit 0c4fa2f

Browse files
Copilotpjbgf
andauthored
fix: pass hash implementation to idxfile decoder
Agent-Logs-Url: https://github.com/go-git/cli/sessions/d5ea0d5f-9205-48ca-9c46-df9a164bd5dd Co-authored-by: pjbgf <5452977+pjbgf@users.noreply.github.com>
1 parent 25e8e28 commit 0c4fa2f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cmd/gogit/verify-pack.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"github.com/go-git/go-git/v6/plumbing"
1616
"github.com/go-git/go-git/v6/plumbing/format/idxfile"
1717
"github.com/go-git/go-git/v6/plumbing/format/packfile"
18+
"github.com/go-git/go-git/v6/plumbing/hash"
1819
"github.com/spf13/cobra"
1920
)
2021

@@ -81,7 +82,7 @@ func verifyPack(path string, verbose bool) error {
8182

8283
idx := idxfile.NewMemoryIndex(ch.Size())
8384

84-
dec := idxfile.NewDecoder(idxFile)
85+
dec := idxfile.NewDecoder(idxFile, hash.New(ch))
8586
if err := dec.Decode(idx); err != nil {
8687
return fmt.Errorf("failed to decode index file: %w", err)
8788
}

0 commit comments

Comments
 (0)