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

Method TestFetch

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

Source from the content-addressed store, hash-verified

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