diff options
author | Miguel Molina <miguel@erizocosmi.co> | 2017-09-06 12:13:41 +0200 |
---|---|---|
committer | Miguel Molina <miguel@erizocosmi.co> | 2017-09-06 12:13:41 +0200 |
commit | 0b68b0fd8e8a0f57419a72479ddeb8d267f15f72 (patch) | |
tree | a6b49669163d3a0a1c85141513eeb52c3ee6561e /plumbing/format/packfile/delta_test.go | |
parent | 2dc59a6925f47e9d1bc99dd64d86e37b79b65d11 (diff) | |
download | go-git-0b68b0fd8e8a0f57419a72479ddeb8d267f15f72.tar.gz |
packfile: reuse delta indexes when possible
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Diffstat (limited to 'plumbing/format/packfile/delta_test.go')
-rw-r--r-- | plumbing/format/packfile/delta_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plumbing/format/packfile/delta_test.go b/plumbing/format/packfile/delta_test.go index 42b777a..f6e93d2 100644 --- a/plumbing/format/packfile/delta_test.go +++ b/plumbing/format/packfile/delta_test.go @@ -84,7 +84,7 @@ func (s *DeltaSuite) TestAddDelta(c *C) { for _, t := range s.testCases { baseBuf := genBytes(t.base) targetBuf := genBytes(t.target) - delta := DiffDelta(baseBuf, targetBuf) + delta := DiffDelta(make(deltaIndex), baseBuf, targetBuf) result, err := PatchDelta(baseBuf, delta) c.Log("Executing test case:", t.description) @@ -98,7 +98,7 @@ func (s *DeltaSuite) TestIncompleteDelta(c *C) { c.Log("Incomplete delta on:", t.description) baseBuf := genBytes(t.base) targetBuf := genBytes(t.target) - delta := DiffDelta(baseBuf, targetBuf) + delta := DiffDelta(make(deltaIndex), baseBuf, targetBuf) delta = delta[:len(delta)-2] result, err := PatchDelta(baseBuf, delta) c.Assert(err, NotNil) |