(c *C)
| 321 | } |
| 322 | |
| 323 | func (s *WorktreeSuite) TestPullAfterShallowClone(c *C) { |
| 324 | tempDir := c.MkDir() |
| 325 | remoteURL := filepath.Join(tempDir, "remote") |
| 326 | repoDir := filepath.Join(tempDir, "repo") |
| 327 | |
| 328 | remote, err := PlainInit(remoteURL, false) |
| 329 | c.Assert(err, IsNil) |
| 330 | c.Assert(remote, NotNil) |
| 331 | |
| 332 | _ = CommitNewFile(c, remote, "File1") |
| 333 | _ = CommitNewFile(c, remote, "File2") |
| 334 | |
| 335 | repo, err := PlainClone(repoDir, false, &CloneOptions{ |
| 336 | URL: remoteURL, |
| 337 | Depth: 1, |
| 338 | Tags: NoTags, |
| 339 | SingleBranch: true, |
| 340 | ReferenceName: "master", |
| 341 | }) |
| 342 | c.Assert(err, IsNil) |
| 343 | |
| 344 | _ = CommitNewFile(c, remote, "File3") |
| 345 | _ = CommitNewFile(c, remote, "File4") |
| 346 | |
| 347 | w, err := repo.Worktree() |
| 348 | c.Assert(err, IsNil) |
| 349 | |
| 350 | err = w.Pull(&PullOptions{ |
| 351 | RemoteName: DefaultRemoteName, |
| 352 | SingleBranch: true, |
| 353 | ReferenceName: plumbing.NewBranchReferenceName("master"), |
| 354 | }) |
| 355 | c.Assert(err, IsNil) |
| 356 | } |
| 357 | |
| 358 | func (s *WorktreeSuite) TestCheckout(c *C) { |
| 359 | fs := memfs.New() |
nothing calls this directly
no test coverage detected