This repository was archived by the owner on Sep 11, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
plumbing/format/commitgraph Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -116,8 +116,7 @@ func (s *CommitgraphSuite) TestReencodeInMemory(c *C) {
116116 for i , hash := range index .Hashes () {
117117 node , err := index .GetNodeByIndex (i )
118118 c .Assert (err , IsNil )
119- err = memoryIndex .Add (hash , node )
120- c .Assert (err , IsNil )
119+ memoryIndex .Add (hash , node )
121120 }
122121 reader .Close ()
123122
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ import (
1414var (
1515 // ErrUnsupportedVersion is returned by OpenFileIndex when the commit graph
1616 // file version is not supported.
17- ErrUnsupportedVersion = errors .New ("Unsuported version" )
17+ ErrUnsupportedVersion = errors .New ("Unsupported version" )
1818 // ErrUnsupportedHash is returned by OpenFileIndex when the commit graph
1919 // hash function is not supported. Currently only SHA-1 is defined and
2020 // supported
21- ErrUnsupportedHash = errors .New ("Unsuported hash algorithm" )
21+ ErrUnsupportedHash = errors .New ("Unsupported hash algorithm" )
2222 // ErrMalformedCommitGraphFile is returned by OpenFileIndex when the commit
2323 // graph file is corrupted.
2424 ErrMalformedCommitGraphFile = errors .New ("Malformed commit graph file" )
Original file line number Diff line number Diff line change @@ -60,12 +60,11 @@ func (mi *MemoryIndex) Hashes() []plumbing.Hash {
6060}
6161
6262// Add adds new node to the memory index
63- func (mi * MemoryIndex ) Add (hash plumbing.Hash , node * Node ) error {
63+ func (mi * MemoryIndex ) Add (hash plumbing.Hash , node * Node ) {
6464 // The parent indexes are calculated lazily in GetNodeByIndex
6565 // which allows adding nodes out of order as long as all parents
6666 // are eventually resolved
6767 node .ParentIndexes = nil
6868 mi .indexMap [hash ] = len (mi .commitData )
6969 mi .commitData = append (mi .commitData , node )
70- return nil
7170}
You can’t perform that action at this time.
0 commit comments