(c *C)
| 1140 | } |
| 1141 | |
| 1142 | func (s *WorktreeSuite) TestStatusUnmodified(c *C) { |
| 1143 | fs := memfs.New() |
| 1144 | w := &Worktree{ |
| 1145 | r: s.Repository, |
| 1146 | Filesystem: fs, |
| 1147 | } |
| 1148 | |
| 1149 | err := w.Checkout(&CheckoutOptions{Force: true}) |
| 1150 | c.Assert(err, IsNil) |
| 1151 | |
| 1152 | status, err := w.StatusWithOptions(StatusOptions{Strategy: Preload}) |
| 1153 | c.Assert(err, IsNil) |
| 1154 | c.Assert(status.IsClean(), Equals, true) |
| 1155 | c.Assert(status.IsUntracked("LICENSE"), Equals, false) |
| 1156 | |
| 1157 | c.Assert(status.File("LICENSE").Staging, Equals, Unmodified) |
| 1158 | c.Assert(status.File("LICENSE").Worktree, Equals, Unmodified) |
| 1159 | |
| 1160 | status, err = w.StatusWithOptions(StatusOptions{Strategy: Empty}) |
| 1161 | c.Assert(err, IsNil) |
| 1162 | c.Assert(status.IsClean(), Equals, true) |
| 1163 | c.Assert(status.IsUntracked("LICENSE"), Equals, false) |
| 1164 | |
| 1165 | c.Assert(status.File("LICENSE").Staging, Equals, Untracked) |
| 1166 | c.Assert(status.File("LICENSE").Worktree, Equals, Untracked) |
| 1167 | } |
| 1168 | |
| 1169 | func (s *WorktreeSuite) TestReset(c *C) { |
| 1170 | fs := memfs.New() |
nothing calls this directly
no test coverage detected