MCPcopy Create free account
hub / github.com/go-git/go-git / TestStatusDeleted

Method TestStatusDeleted

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

Source from the content-addressed store, hash-verified

1367}
1368
1369func (s *WorktreeSuite) TestStatusDeleted(c *C) {
1370 fs, clean := s.TemporalFilesystem()
1371 defer clean()
1372
1373 w := &Worktree{
1374 r: s.Repository,
1375 Filesystem: fs,
1376 }
1377
1378 err := w.Checkout(&CheckoutOptions{})
1379 c.Assert(err, IsNil)
1380
1381 err = fs.Remove(".gitignore")
1382 c.Assert(err, IsNil)
1383
1384 status, err := w.Status()
1385 c.Assert(err, IsNil)
1386 c.Assert(status.IsClean(), Equals, false)
1387 c.Assert(status.File(".gitignore").Worktree, Equals, Deleted)
1388}
1389
1390func (s *WorktreeSuite) TestSubmodule(c *C) {
1391 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