aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plumbing/object/change_adaptor_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/plumbing/object/change_adaptor_test.go b/plumbing/object/change_adaptor_test.go
index 566e6de..317c0d6 100644
--- a/plumbing/object/change_adaptor_test.go
+++ b/plumbing/object/change_adaptor_test.go
@@ -214,6 +214,7 @@ func (s *ChangeAdaptorSuite) TestChangeFilesInsert(c *C) {
change := Change{}
change.To.Name = "json/long.json"
change.To.Tree = tree
+ change.To.TreeEntry.Mode = filemode.Regular
change.To.TreeEntry.Hash = plumbing.NewHash("49c6bb89b17060d7b4deacb7b338fcc6ea2352a9")
from, to, err := change.Files()
@@ -228,6 +229,7 @@ func (s *ChangeAdaptorSuite) TestChangeFilesInsertNotFound(c *C) {
change := Change{}
change.To.Name = "json/long.json"
change.To.Tree = tree
+ change.To.TreeEntry.Mode = filemode.Regular
// there is no object for this hash
change.To.TreeEntry.Hash = plumbing.NewHash("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
@@ -241,6 +243,7 @@ func (s *ChangeAdaptorSuite) TestChangeFilesDelete(c *C) {
change := Change{}
change.From.Name = "json/long.json"
change.From.Tree = tree
+ change.From.TreeEntry.Mode = filemode.Regular
change.From.TreeEntry.Hash = plumbing.NewHash("49c6bb89b17060d7b4deacb7b338fcc6ea2352a9")
from, to, err := change.Files()
@@ -255,6 +258,7 @@ func (s *ChangeAdaptorSuite) TestChangeFilesDeleteNotFound(c *C) {
change := Change{}
change.From.Name = "json/long.json"
change.From.Tree = tree
+ change.From.TreeEntry.Mode = filemode.Regular
// there is no object for this hash
change.From.TreeEntry.Hash = plumbing.NewHash("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
@@ -268,9 +272,11 @@ func (s *ChangeAdaptorSuite) TestChangeFilesModify(c *C) {
change := Change{}
change.To.Name = "json/long.json"
change.To.Tree = tree
+ change.To.TreeEntry.Mode = filemode.Regular
change.To.TreeEntry.Hash = plumbing.NewHash("49c6bb89b17060d7b4deacb7b338fcc6ea2352a9")
change.From.Name = "json/long.json"
change.From.Tree = tree
+ change.From.TreeEntry.Mode = filemode.Regular
change.From.TreeEntry.Hash = plumbing.NewHash("9a48f23120e880dfbe41f7c9b7b708e9ee62a492")
from, to, err := change.Files()