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

Method TestSubmodules

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

Source from the content-addressed store, hash-verified

1402}
1403
1404func (s *WorktreeSuite) TestSubmodules(c *C) {
1405 path := fixtures.ByTag("submodule").One().Worktree().Root()
1406 r, err := PlainOpen(path)
1407 c.Assert(err, IsNil)
1408
1409 w, err := r.Worktree()
1410 c.Assert(err, IsNil)
1411
1412 l, err := w.Submodules()
1413 c.Assert(err, IsNil)
1414
1415 c.Assert(l, HasLen, 2)
1416}
1417
1418func (s *WorktreeSuite) TestAddUntracked(c *C) {
1419 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