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

Method TestPullProgressWithRecursion

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected