(c *C)
| 277 | } |
| 278 | |
| 279 | func (s *WorktreeSuite) TestCommitAll(c *C) { |
| 280 | expected := plumbing.NewHash("aede6f8c9c1c7ec9ca8d287c64b8ed151276fa28") |
| 281 | |
| 282 | fs := memfs.New() |
| 283 | w := &Worktree{ |
| 284 | r: s.Repository, |
| 285 | Filesystem: fs, |
| 286 | } |
| 287 | |
| 288 | err := w.Checkout(&CheckoutOptions{}) |
| 289 | c.Assert(err, IsNil) |
| 290 | |
| 291 | util.WriteFile(fs, "LICENSE", []byte("foo"), 0644) |
| 292 | util.WriteFile(fs, "foo", []byte("foo"), 0644) |
| 293 | |
| 294 | hash, err := w.Commit("foo\n", &CommitOptions{ |
| 295 | All: true, |
| 296 | Author: defaultSignature(), |
| 297 | }) |
| 298 | |
| 299 | c.Assert(hash, Equals, expected) |
| 300 | c.Assert(err, IsNil) |
| 301 | |
| 302 | assertStorageStatus(c, s.Repository, 13, 11, 10, expected) |
| 303 | } |
| 304 | |
| 305 | func (s *WorktreeSuite) TestRemoveAndCommitAll(c *C) { |
| 306 | expected := plumbing.NewHash("907cd576c6ced2ecd3dab34a72bf9cf65944b9a9") |
nothing calls this directly
no test coverage detected