MCPcopy Index your code
hub / github.com/go-git/go-git / TestRemoveNotExistentEntry

Method TestRemoveNotExistentEntry

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

Source from the content-addressed store, hash-verified

2369}
2370
2371func (s *WorktreeSuite) TestRemoveNotExistentEntry(c *C) {
2372 fs := memfs.New()
2373 w := &Worktree{
2374 r: s.Repository,
2375 Filesystem: fs,
2376 }
2377
2378 err := w.Checkout(&CheckoutOptions{Force: true})
2379 c.Assert(err, IsNil)
2380
2381 hash, err := w.Remove("not-exists")
2382 c.Assert(hash.IsZero(), Equals, true)
2383 c.Assert(err, NotNil)
2384}
2385
2386func (s *WorktreeSuite) TestRemoveDirectory(c *C) {
2387 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