aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/encoder_test.go
diff options
context:
space:
mode:
authorJavi Fontan <jfontan@gmail.com>2018-01-25 10:29:46 +0100
committerJavi Fontan <jfontan@gmail.com>2018-01-25 10:29:46 +0100
commitd5f74d2d3cd63325c6d16f5e93f78d6462ec9308 (patch)
tree8dc803bf7c1d8a9a6f628375da1daee126cd1b01 /plumbing/format/packfile/encoder_test.go
parent522327b572276fe94e76ff9bb5e41b1efdf69dee (diff)
downloadgo-git-d5f74d2d3cd63325c6d16f5e93f78d6462ec9308.tar.gz
plumbing: format/packfile, check nil objects in ObjectToPack
SetOriginal now skips setting resolved values if the provided object is nil. BackToOriginal also skips nil Original objects. Signed-off-by: Javi Fontan <jfontan@gmail.com>
Diffstat (limited to 'plumbing/format/packfile/encoder_test.go')
-rw-r--r--plumbing/format/packfile/encoder_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plumbing/format/packfile/encoder_test.go b/plumbing/format/packfile/encoder_test.go
index 06cb1c6..63dfafa 100644
--- a/plumbing/format/packfile/encoder_test.go
+++ b/plumbing/format/packfile/encoder_test.go
@@ -233,10 +233,10 @@ func (s *EncoderSuite) deltaOverDeltaCyclicTest(c *C) {
// is nil.
po1.SetOriginal(po1.Original)
pd2.SetOriginal(pd2.Original)
- pd2.Original = nil
+ pd2.SetOriginal(nil)
pd3.SetOriginal(pd3.Original)
- pd3.Original = nil
+ pd3.SetOriginal(nil)
pd4.SetOriginal(pd4.Original)