MCPcopy Create free account
hub / github.com/go-git/go-git / TestRemoveNotExistentEntry

Method TestRemoveNotExistentEntry

worktree_test.go:2113–2126  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

2111}
2112
2113func (s *WorktreeSuite) TestRemoveNotExistentEntry(c *C) {
2114 fs := memfs.New()
2115 w := &Worktree{
2116 r: s.Repository,
2117 Filesystem: fs,
2118 }
2119
2120 err := w.Checkout(&CheckoutOptions{Force: true})
2121 c.Assert(err, IsNil)
2122
2123 hash, err := w.Remove("not-exists")
2124 c.Assert(hash.IsZero(), Equals, true)
2125 c.Assert(err, NotNil)
2126}
2127
2128func (s *WorktreeSuite) TestRemoveDirectory(c *C) {
2129 fs := memfs.New()

Callers

nothing calls this directly

Calls 3

CheckoutMethod · 0.95
RemoveMethod · 0.95
IsZeroMethod · 0.65

Tested by

no test coverage detected