(c *C)
| 2111 | } |
| 2112 | |
| 2113 | func (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 | |
| 2128 | func (s *WorktreeSuite) TestRemoveDirectory(c *C) { |
| 2129 | fs := memfs.New() |