aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/commitgraph/memory.go
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2023-10-08 12:12:05 +0100
committerGitHub <noreply@github.com>2023-10-08 12:12:05 +0100
commitb2df4aa7072e1e30abe3b97896dc437300b02845 (patch)
treeee2718e1ac621c88716068842e4ae38ed69862e8 /plumbing/format/commitgraph/memory.go
parent19fe126d8889134e6224717a756745eed9985e22 (diff)
parent946bb8183643bdda90810fc48e450a008894b244 (diff)
downloadgo-git-b2df4aa7072e1e30abe3b97896dc437300b02845.tar.gz
Merge pull request #854 from zeripath/graph-chain
plumbing: commitgraph, Allow reading commit-graph chains
Diffstat (limited to 'plumbing/format/commitgraph/memory.go')
-rw-r--r--plumbing/format/commitgraph/memory.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/plumbing/format/commitgraph/memory.go b/plumbing/format/commitgraph/memory.go
index b24ce36..06415e5 100644
--- a/plumbing/format/commitgraph/memory.go
+++ b/plumbing/format/commitgraph/memory.go
@@ -6,12 +6,18 @@ import (
// MemoryIndex provides a way to build the commit-graph in memory
// for later encoding to file.
+//
+// Deprecated: This package uses the wrong types for Generation and Index in CommitData.
+// Use the v2 package instead.
type MemoryIndex struct {
commitData []*CommitData
indexMap map[plumbing.Hash]int
}
// NewMemoryIndex creates in-memory commit graph representation
+//
+// Deprecated: This package uses the wrong types for Generation and Index in CommitData.
+// Use the v2 package instead.
func NewMemoryIndex() *MemoryIndex {
return &MemoryIndex{
indexMap: make(map[plumbing.Hash]int),