Skip to content

Commit 5a95501

Browse files
Copilotpjbgf
andauthored
fix: pass hash argument to idxfile.NewDecoder
Agent-Logs-Url: https://github.com/go-git/cli/sessions/9a1d547d-ceff-4f15-9573-b555e3c90528 Co-authored-by: pjbgf <5452977+pjbgf@users.noreply.github.com>
1 parent b340bdf commit 5a95501

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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
}

gogit

60.2 MB
Binary file not shown.

0 commit comments

Comments
 (0)