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

Method TestSubmodule

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

Source from the content-addressed store, hash-verified

1388}
1389
1390func (s *WorktreeSuite) TestSubmodule(c *C) {
1391 path := fixtures.ByTag("submodule").One().Worktree().Root()
1392 r, err := PlainOpen(path)
1393 c.Assert(err, IsNil)
1394
1395 w, err := r.Worktree()
1396 c.Assert(err, IsNil)
1397
1398 m, err := w.Submodule("basic")
1399 c.Assert(err, IsNil)
1400
1401 c.Assert(m.Config().Name, Equals, "basic")
1402}
1403
1404func (s *WorktreeSuite) TestSubmodules(c *C) {
1405 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