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

Method TestSubmodules

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

Source from the content-addressed store, hash-verified

1602}
1603
1604func (s *WorktreeSuite) TestSubmodules(c *C) {
1605 path := fixtures.ByTag("submodule").One().Worktree().Root()
1606 r, err := PlainOpen(path)
1607 c.Assert(err, IsNil)
1608
1609 w, err := r.Worktree()
1610 c.Assert(err, IsNil)
1611
1612 l, err := w.Submodules()
1613 c.Assert(err, IsNil)
1614
1615 c.Assert(l, HasLen, 2)
1616}
1617
1618func (s *WorktreeSuite) TestAddUntracked(c *C) {
1619 fs := memfs.New()

Callers

nothing calls this directly

Calls 4

PlainOpenFunction · 0.85
RootMethod · 0.80
WorktreeMethod · 0.80
SubmodulesMethod · 0.80

Tested by

no test coverage detected