(c *C)
| 2306 | } |
| 2307 | |
| 2308 | func (s *WorktreeSuite) TestMoveToExistent(c *C) { |
| 2309 | fs := memfs.New() |
| 2310 | w := &Worktree{ |
| 2311 | r: s.Repository, |
| 2312 | Filesystem: fs, |
| 2313 | } |
| 2314 | |
| 2315 | err := w.Checkout(&CheckoutOptions{Force: true}) |
| 2316 | c.Assert(err, IsNil) |
| 2317 | |
| 2318 | hash, err := w.Move(".gitignore", "LICENSE") |
| 2319 | c.Assert(hash.IsZero(), Equals, true) |
| 2320 | c.Assert(err, Equals, ErrDestinationExists) |
| 2321 | } |
| 2322 | |
| 2323 | func (s *WorktreeSuite) TestClean(c *C) { |
| 2324 | fs := fixtures.ByTag("dirty").One().Worktree() |