aboutsummaryrefslogtreecommitdiffstats
path: root/worktree_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-01-30 11:27:42 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2017-01-30 11:27:42 +0100
commit677a596cdb534f485ff8d9488e05855387a6ef00 (patch)
tree8ac7334d3635a20821d07b8a76b7c4bd21578109 /worktree_test.go
parentd24e1e9a69c2082763db51959121d3936e621658 (diff)
downloadgo-git-677a596cdb534f485ff8d9488e05855387a6ef00.tar.gz
Worktree correct FileMode at index entries
Diffstat (limited to 'worktree_test.go')
-rw-r--r--worktree_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/worktree_test.go b/worktree_test.go
index 163df7b..55c0078 100644
--- a/worktree_test.go
+++ b/worktree_test.go
@@ -5,6 +5,7 @@ import (
"os"
"gopkg.in/src-d/go-git.v4/plumbing/format/index"
+ "gopkg.in/src-d/go-git.v4/plumbing/object"
. "gopkg.in/check.v1"
"srcd.works/go-billy.v1/memory"
@@ -70,8 +71,7 @@ func (s *WorktreeSuite) TestCheckoutIndexMemory(c *C) {
c.Assert(idx.Entries, HasLen, 9)
c.Assert(idx.Entries[0].Hash.String(), Equals, "32858aad3c383ed1ff0a0f9bdf231d54a00c9e88")
c.Assert(idx.Entries[0].Name, Equals, ".gitignore")
- // in memoryfs the perms are not supported
- c.Assert(idx.Entries[0].Mode, Equals, os.FileMode(0))
+ c.Assert(idx.Entries[0].Mode, Equals, object.FileMode)
c.Assert(idx.Entries[0].ModifiedAt.IsZero(), Equals, false)
c.Assert(idx.Entries[0].Size, Equals, uint32(189))
@@ -104,7 +104,7 @@ func (s *WorktreeSuite) TestCheckoutIndexOS(c *C) {
c.Assert(idx.Entries, HasLen, 9)
c.Assert(idx.Entries[0].Hash.String(), Equals, "32858aad3c383ed1ff0a0f9bdf231d54a00c9e88")
c.Assert(idx.Entries[0].Name, Equals, ".gitignore")
- c.Assert(idx.Entries[0].Mode, Equals, os.FileMode(0644))
+ c.Assert(idx.Entries[0].Mode, Equals, object.FileMode)
c.Assert(idx.Entries[0].ModifiedAt.IsZero(), Equals, false)
c.Assert(idx.Entries[0].Size, Equals, uint32(189))