MCPcopy
hub / github.com/go-git/go-git / TestStatusDeleted

Method TestStatusDeleted

worktree_test.go:1570–1588  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

1568}
1569
1570func (s *WorktreeSuite) TestStatusDeleted(c *C) {
1571 fs := s.TemporalFilesystem(c)
1572
1573 w := &Worktree{
1574 r: s.Repository,
1575 Filesystem: fs,
1576 }
1577
1578 err := w.Checkout(&CheckoutOptions{})
1579 c.Assert(err, IsNil)
1580
1581 err = fs.Remove(".gitignore")
1582 c.Assert(err, IsNil)
1583
1584 status, err := w.Status()
1585 c.Assert(err, IsNil)
1586 c.Assert(status.IsClean(), Equals, false)
1587 c.Assert(status.File(".gitignore").Worktree, Equals, Deleted)
1588}
1589
1590func (s *WorktreeSuite) TestSubmodule(c *C) {
1591 path := fixtures.ByTag("submodule").One().Worktree().Root()

Callers

nothing calls this directly

Calls 6

CheckoutMethod · 0.95
StatusMethod · 0.95
TemporalFilesystemMethod · 0.45
RemoveMethod · 0.45
IsCleanMethod · 0.45
FileMethod · 0.45

Tested by

no test coverage detected