diff options
-rw-r--r-- | plumbing/format/commitgraph/commitgraph_test.go | 2 | ||||
-rw-r--r-- | plumbing/format/commitgraph/encoder.go | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/plumbing/format/commitgraph/commitgraph_test.go b/plumbing/format/commitgraph/commitgraph_test.go index a8e4557..b984142 100644 --- a/plumbing/format/commitgraph/commitgraph_test.go +++ b/plumbing/format/commitgraph/commitgraph_test.go @@ -1,7 +1,6 @@ package commitgraph_test
import (
- "fmt"
"io/ioutil"
"os"
"path"
@@ -95,7 +94,6 @@ func (s *CommitgraphSuite) TestReencode(c *C) { writer, err := ioutil.TempFile(dotgit.Root(), "commit-graph")
c.Assert(err, IsNil)
tmpName := writer.Name()
- fmt.Printf(tmpName)
defer os.Remove(tmpName)
encoder := commitgraph.NewEncoder(writer)
err = encoder.Encode(index)
diff --git a/plumbing/format/commitgraph/encoder.go b/plumbing/format/commitgraph/encoder.go index b4a6978..501b09e 100644 --- a/plumbing/format/commitgraph/encoder.go +++ b/plumbing/format/commitgraph/encoder.go @@ -80,7 +80,7 @@ func (e *Encoder) prepare(idx Index, hashes []plumbing.Hash) (hashToIndex map[pl for i := 0; i < len(hashes); i++ {
v, _ := idx.GetNodeByIndex(i)
if len(v.ParentHashes) > 2 {
- largeEdgesCount += uint32(len(v.ParentHashes) - 2)
+ largeEdgesCount += uint32(len(v.ParentHashes) - 1)
break
}
}
|