| 1159 | } |
| 1160 | |
| 1161 | func (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 | |
| 1183 | func (s *RepositorySuite) TestPlainCloneWithShallowSubmodules(c *C) { |
| 1184 | if testing.Short() { |