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

Method TestPullProgressWithRecursion

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

Source from the content-addressed store, hash-verified

219}
220
221func (s *WorktreeSuite) TestPullProgressWithRecursion(c *C) {
222 if testing.Short() {
223 c.Skip("skipping test in short mode.")
224 }
225
226 path := fixtures.ByTag("submodule").One().Worktree().Root()
227
228 dir, clean := s.TemporalDir()
229 defer clean()
230
231 r, _ := PlainInit(dir, false)
232 r.CreateRemote(&config.RemoteConfig{
233 Name: DefaultRemoteName,
234 URLs: []string{path},
235 })
236
237 w, err := r.Worktree()
238 c.Assert(err, IsNil)
239
240 err = w.Pull(&PullOptions{
241 RecurseSubmodules: DefaultSubmoduleRecursionDepth,
242 })
243 c.Assert(err, IsNil)
244
245 cfg, err := r.Config()
246 c.Assert(err, IsNil)
247 c.Assert(cfg.Submodules, HasLen, 2)
248}
249
250func (s *RepositorySuite) TestPullAdd(c *C) {
251 path := fixtures.Basic().ByTag("worktree").One().Worktree().Root()

Callers

nothing calls this directly

Calls 9

PlainInitFunction · 0.85
ShortMethod · 0.80
RootMethod · 0.80
WorktreeMethod · 0.80
TemporalDirMethod · 0.80
CreateRemoteMethod · 0.80
PullMethod · 0.80
SkipMethod · 0.65
ConfigMethod · 0.65

Tested by

no test coverage detected