-
Notifications
You must be signed in to change notification settings - Fork 534
format/packfile: fix bug when the delta depth is equals to 50 #374
Conversation
@@ -197,3 +197,8 @@ func (s *DeltaSelectorSuite) TestObjectsToPack(c *C) { | |||
c.Assert(otp[2].IsDelta(), Equals, true) | |||
c.Assert(otp[2].Depth, Equals, 2) | |||
} | |||
|
|||
func (s *DeltaSelectorSuite) TestMaxDepth(c *C) { | |||
dsl := s.ds.deltaSizeLimit(0, 0, 50, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use maxDepth
instead of 50
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we test this on a public function instead? private functions can change (or be removed) at any time, which may remove this test in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic to be able to create a delta with a depth of 50 is really complicated using public methods in deltaSelector
(the only one is ObjectsToPack()
). That's why I choose to test it using a private method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@ajnavarro @alcortesm ping |
Changes are still pending, do you want me to ignore them and approve the PR instead? |
Codecov Report
@@ Coverage Diff @@
## master #374 +/- ##
==========================================
- Coverage 77.29% 76.76% -0.53%
==========================================
Files 123 122 -1
Lines 8751 8604 -147
==========================================
- Hits 6764 6605 -159
- Misses 1226 1273 +47
+ Partials 761 726 -35
Continue to review full report at Codecov.
|
Rebased and using |
@ajnavarro CI is failing |
yes, a go vet issue, it should be easy to fix. |
No description provided.