MCPcopy
hub / github.com/go-git/go-git / TestDiffSymlinkDirOnB

Method TestDiffSymlinkDirOnB

utils/merkletrie/filesystem/node_test.go:113–129  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

111}
112
113func (s *NoderSuite) TestDiffSymlinkDirOnB(c *C) {
114 fsA := memfs.New()
115 fsA.Symlink("qux", "foo")
116 WriteFile(fsA, "qux/qux", []byte("foo"), 0644)
117
118 fsB := memfs.New()
119 WriteFile(fsB, "qux/qux", []byte("foo"), 0644)
120
121 ch, err := merkletrie.DiffTree(
122 NewRootNode(fsA, nil),
123 NewRootNode(fsB, nil),
124 IsEquals,
125 )
126
127 c.Assert(err, IsNil)
128 c.Assert(ch, HasLen, 1)
129}
130
131func (s *NoderSuite) TestDiffChangeMissing(c *C) {
132 fsA := memfs.New()

Callers

nothing calls this directly

Calls 4

DiffTreeFunction · 0.92
WriteFileFunction · 0.85
NewRootNodeFunction · 0.70
SymlinkMethod · 0.45

Tested by

no test coverage detected