(c *C)
| 2369 | } |
| 2370 | |
| 2371 | func (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 | |
| 2386 | func (s *WorktreeSuite) TestRemoveDirectory(c *C) { |
| 2387 | fs := memfs.New() |