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

Method TestFetch

remote_test.go:136–148  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

134}
135
136func (s *RemoteSuite) TestFetch(c *C) {
137 r := NewRemote(memory.NewStorage(), &config.RemoteConfig{
138 URLs: []string{s.GetLocalRepositoryURL(fixtures.ByTag("tags").One())},
139 })
140
141 s.testFetch(c, r, &FetchOptions{
142 RefSpecs: []config.RefSpec{
143 config.RefSpec("+refs/heads/master:refs/remotes/origin/master"),
144 },
145 }, []*plumbing.Reference{
146 plumbing.NewReferenceFromStrings("refs/remotes/origin/master", "f7b877701fbf855b44c0a9e86f3fdce2c298b07f"),
147 })
148}
149
150func (s *RemoteSuite) TestFetchToNewBranch(c *C) {
151 r := NewRemote(memory.NewStorage(), &config.RemoteConfig{

Callers

nothing calls this directly

Calls 6

testFetchMethod · 0.95
NewStorageFunction · 0.92
RefSpecTypeAlias · 0.92
NewReferenceFromStringsFunction · 0.92
NewRemoteFunction · 0.85
GetLocalRepositoryURLMethod · 0.80

Tested by

no test coverage detected