aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/commitgraph/memory.go
diff options
context:
space:
mode:
authorFilip Navara <navara@emclient.com>2019-04-25 06:58:36 +0200
committerFilip Navara <navara@emclient.com>2019-04-25 06:58:36 +0200
commit64f9d9a20765076eb024d38b2278a100829bf155 (patch)
tree9ee2fd61c70822031d206512f78a594ace916b0e /plumbing/format/commitgraph/memory.go
parent5c6d199dc675465f5e103ea36c0bfcb9d3ebc565 (diff)
downloadgo-git-64f9d9a20765076eb024d38b2278a100829bf155.tar.gz
plumbing: format/commitgraph, clean up error handling
Signed-off-by: Filip Navara <navara@emclient.com>
Diffstat (limited to 'plumbing/format/commitgraph/memory.go')
-rw-r--r--plumbing/format/commitgraph/memory.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/plumbing/format/commitgraph/memory.go b/plumbing/format/commitgraph/memory.go
index 316bc6d..1d57a07 100644
--- a/plumbing/format/commitgraph/memory.go
+++ b/plumbing/format/commitgraph/memory.go
@@ -60,12 +60,11 @@ func (mi *MemoryIndex) Hashes() []plumbing.Hash {
}
// Add adds new node to the memory index
-func (mi *MemoryIndex) Add(hash plumbing.Hash, node *Node) error {
+func (mi *MemoryIndex) Add(hash plumbing.Hash, node *Node) {
// The parent indexes are calculated lazily in GetNodeByIndex
// which allows adding nodes out of order as long as all parents
// are eventually resolved
node.ParentIndexes = nil
mi.indexMap[hash] = len(mi.commitData)
mi.commitData = append(mi.commitData, node)
- return nil
}