(c *C)
| 2548 | } |
| 2549 | |
| 2550 | func (s *WorktreeSuite) TestMoveNotExistentEntry(c *C) { |
| 2551 | fs := memfs.New() |
| 2552 | w := &Worktree{ |
| 2553 | r: s.Repository, |
| 2554 | Filesystem: fs, |
| 2555 | } |
| 2556 | |
| 2557 | err := w.Checkout(&CheckoutOptions{Force: true}) |
| 2558 | c.Assert(err, IsNil) |
| 2559 | |
| 2560 | hash, err := w.Move("not-exists", "foo") |
| 2561 | c.Assert(hash.IsZero(), Equals, true) |
| 2562 | c.Assert(err, NotNil) |
| 2563 | } |
| 2564 | |
| 2565 | func (s *WorktreeSuite) TestMoveToExistent(c *C) { |
| 2566 | fs := memfs.New() |