(c *C)
| 1756 | } |
| 1757 | |
| 1758 | func (s *WorktreeSuite) TestAddUnmodified(c *C) { |
| 1759 | fs := memfs.New() |
| 1760 | w := &Worktree{ |
| 1761 | r: s.Repository, |
| 1762 | Filesystem: fs, |
| 1763 | } |
| 1764 | |
| 1765 | err := w.Checkout(&CheckoutOptions{Force: true}) |
| 1766 | c.Assert(err, IsNil) |
| 1767 | |
| 1768 | hash, err := w.Add("LICENSE") |
| 1769 | c.Assert(hash.String(), Equals, "c192bd6a24ea1ab01d78686e417c8bdc7c3d197f") |
| 1770 | c.Assert(err, IsNil) |
| 1771 | } |
| 1772 | |
| 1773 | func (s *WorktreeSuite) TestAddRemoved(c *C) { |
| 1774 | fs := memfs.New() |