(c *C)
| 148 | } |
| 149 | |
| 150 | func (s *RemoteSuite) TestFetchToNewBranch(c *C) { |
| 151 | r := NewRemote(memory.NewStorage(), &config.RemoteConfig{ |
| 152 | URLs: []string{s.GetLocalRepositoryURL(fixtures.ByTag("tags").One())}, |
| 153 | }) |
| 154 | |
| 155 | s.testFetch(c, r, &FetchOptions{ |
| 156 | RefSpecs: []config.RefSpec{ |
| 157 | // qualified branch to unqualified branch |
| 158 | "refs/heads/master:foo", |
| 159 | // unqualified branch to unqualified branch |
| 160 | "+master:bar", |
| 161 | // unqualified tag to unqualified branch |
| 162 | config.RefSpec("tree-tag:tree-tag"), |
| 163 | // unqualified tag to qualified tag |
| 164 | config.RefSpec("+commit-tag:refs/tags/renamed-tag"), |
| 165 | }, |
| 166 | }, []*plumbing.Reference{ |
| 167 | plumbing.NewReferenceFromStrings("refs/heads/foo", "f7b877701fbf855b44c0a9e86f3fdce2c298b07f"), |
| 168 | plumbing.NewReferenceFromStrings("refs/heads/bar", "f7b877701fbf855b44c0a9e86f3fdce2c298b07f"), |
| 169 | plumbing.NewReferenceFromStrings("refs/heads/tree-tag", "152175bf7e5580299fa1f0ba41ef6474cc043b70"), |
| 170 | plumbing.NewReferenceFromStrings("refs/tags/tree-tag", "152175bf7e5580299fa1f0ba41ef6474cc043b70"), |
| 171 | plumbing.NewReferenceFromStrings("refs/tags/renamed-tag", "ad7897c0fb8e7d9a9ba41fa66072cf06095a6cfc"), |
| 172 | plumbing.NewReferenceFromStrings("refs/tags/commit-tag", "ad7897c0fb8e7d9a9ba41fa66072cf06095a6cfc"), |
| 173 | }) |
| 174 | } |
| 175 | |
| 176 | func (s *RemoteSuite) TestFetchToNewBranchWithAllTags(c *C) { |
| 177 | r := NewRemote(memory.NewStorage(), &config.RemoteConfig{ |
nothing calls this directly
no test coverage detected