(c *C)
| 397 | } |
| 398 | |
| 399 | func (s *WorktreeSuite) TestCommitAll(c *C) { |
| 400 | expected := plumbing.NewHash("aede6f8c9c1c7ec9ca8d287c64b8ed151276fa28") |
| 401 | |
| 402 | fs := memfs.New() |
| 403 | w := &Worktree{ |
| 404 | r: s.Repository, |
| 405 | Filesystem: fs, |
| 406 | } |
| 407 | |
| 408 | err := w.Checkout(&CheckoutOptions{}) |
| 409 | c.Assert(err, IsNil) |
| 410 | |
| 411 | util.WriteFile(fs, "LICENSE", []byte("foo"), 0644) |
| 412 | util.WriteFile(fs, "foo", []byte("foo"), 0644) |
| 413 | |
| 414 | hash, err := w.Commit("foo\n", &CommitOptions{ |
| 415 | All: true, |
| 416 | Author: defaultSignature(), |
| 417 | }) |
| 418 | |
| 419 | c.Assert(hash, Equals, expected) |
| 420 | c.Assert(err, IsNil) |
| 421 | |
| 422 | assertStorageStatus(c, s.Repository, 13, 11, 10, expected) |
| 423 | } |
| 424 | |
| 425 | func (s *WorktreeSuite) TestRemoveAndCommitAll(c *C) { |
| 426 | expected := plumbing.NewHash("907cd576c6ced2ecd3dab34a72bf9cf65944b9a9") |
nothing calls this directly
no test coverage detected