| 1548 | } |
| 1549 | |
| 1550 | func (s *WorktreeSuite) TestStatusUntracked(c *C) { |
| 1551 | fs := memfs.New() |
| 1552 | w := &Worktree{ |
| 1553 | r: s.Repository, |
| 1554 | Filesystem: fs, |
| 1555 | } |
| 1556 | |
| 1557 | err := w.Checkout(&CheckoutOptions{Force: true}) |
| 1558 | c.Assert(err, IsNil) |
| 1559 | |
| 1560 | f, err := w.Filesystem.Create("foo") |
| 1561 | c.Assert(err, IsNil) |
| 1562 | c.Assert(f.Close(), IsNil) |
| 1563 | |
| 1564 | status, err := w.Status() |
| 1565 | c.Assert(err, IsNil) |
| 1566 | c.Assert(status.File("foo").Staging, Equals, Untracked) |
| 1567 | c.Assert(status.File("foo").Worktree, Equals, Untracked) |
| 1568 | } |
| 1569 | |
| 1570 | func (s *WorktreeSuite) TestStatusDeleted(c *C) { |
| 1571 | fs := s.TemporalFilesystem(c) |