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

Method TestPlainCloneWithRecurseSubmodules

repository_test.go:1161–1181  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

1159}
1160
1161func (s *RepositorySuite) TestPlainCloneWithRecurseSubmodules(c *C) {
1162 if testing.Short() {
1163 c.Skip("skipping test in short mode.")
1164 }
1165
1166 dir := c.MkDir()
1167
1168 path := fixtures.ByTag("submodule").One().Worktree().Root()
1169 r, err := PlainClone(dir, false, &CloneOptions{
1170 URL: path,
1171 RecurseSubmodules: DefaultSubmoduleRecursionDepth,
1172 })
1173
1174 c.Assert(err, IsNil)
1175
1176 cfg, err := r.Config()
1177 c.Assert(err, IsNil)
1178 c.Assert(cfg.Remotes, HasLen, 1)
1179 c.Assert(cfg.Branches, HasLen, 1)
1180 c.Assert(cfg.Submodules, HasLen, 2)
1181}
1182
1183func (s *RepositorySuite) TestPlainCloneWithShallowSubmodules(c *C) {
1184 if testing.Short() {

Callers

nothing calls this directly

Calls 6

PlainCloneFunction · 0.85
ShortMethod · 0.80
RootMethod · 0.80
WorktreeMethod · 0.80
SkipMethod · 0.65
ConfigMethod · 0.65

Tested by

no test coverage detected