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

Method TestSubmodule

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

Source from the content-addressed store, hash-verified

1588}
1589
1590func (s *WorktreeSuite) TestSubmodule(c *C) {
1591 path := fixtures.ByTag("submodule").One().Worktree().Root()
1592 r, err := PlainOpen(path)
1593 c.Assert(err, IsNil)
1594
1595 w, err := r.Worktree()
1596 c.Assert(err, IsNil)
1597
1598 m, err := w.Submodule("basic")
1599 c.Assert(err, IsNil)
1600
1601 c.Assert(m.Config().Name, Equals, "basic")
1602}
1603
1604func (s *WorktreeSuite) TestSubmodules(c *C) {
1605 path := fixtures.ByTag("submodule").One().Worktree().Root()

Callers

nothing calls this directly

Calls 5

PlainOpenFunction · 0.85
RootMethod · 0.80
WorktreeMethod · 0.80
SubmoduleMethod · 0.80
ConfigMethod · 0.65

Tested by

no test coverage detected