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

Method TestPullCheckout

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

Source from the content-addressed store, hash-verified

52}
53
54func (s *WorktreeSuite) TestPullCheckout(c *C) {
55 fs := memfs.New()
56 r, _ := Init(memory.NewStorage(), fs)
57 r.CreateRemote(&config.RemoteConfig{
58 Name: DefaultRemoteName,
59 URLs: []string{s.GetBasicLocalRepositoryURL()},
60 })
61
62 w, err := r.Worktree()
63 c.Assert(err, IsNil)
64
65 err = w.Pull(&PullOptions{})
66 c.Assert(err, IsNil)
67
68 fi, err := fs.ReadDir("")
69 c.Assert(err, IsNil)
70 c.Assert(fi, HasLen, 8)
71}
72
73func (s *WorktreeSuite) TestPullFastForward(c *C) {
74 url := c.MkDir()

Callers

nothing calls this directly

Calls 7

NewStorageFunction · 0.92
InitFunction · 0.85
CreateRemoteMethod · 0.80
WorktreeMethod · 0.80
PullMethod · 0.80
ReadDirMethod · 0.45

Tested by

no test coverage detected