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

Method TestPullCheckout

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

Source from the content-addressed store, hash-verified

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

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