(c *C)
| 1556 | } |
| 1557 | |
| 1558 | func (s *WorktreeSuite) TestAddUnmodified(c *C) { |
| 1559 | fs := memfs.New() |
| 1560 | w := &Worktree{ |
| 1561 | r: s.Repository, |
| 1562 | Filesystem: fs, |
| 1563 | } |
| 1564 | |
| 1565 | err := w.Checkout(&CheckoutOptions{Force: true}) |
| 1566 | c.Assert(err, IsNil) |
| 1567 | |
| 1568 | hash, err := w.Add("LICENSE") |
| 1569 | c.Assert(hash.String(), Equals, "c192bd6a24ea1ab01d78686e417c8bdc7c3d197f") |
| 1570 | c.Assert(err, IsNil) |
| 1571 | } |
| 1572 | |
| 1573 | func (s *WorktreeSuite) TestAddRemoved(c *C) { |
| 1574 | fs := memfs.New() |