(c *C)
| 799 | } |
| 800 | |
| 801 | func (s *WorktreeSuite) TestCheckoutBranchAndHash(c *C) { |
| 802 | w := &Worktree{ |
| 803 | r: s.Repository, |
| 804 | Filesystem: memfs.New(), |
| 805 | } |
| 806 | |
| 807 | err := w.Checkout(&CheckoutOptions{ |
| 808 | Branch: "refs/heads/foo", |
| 809 | Hash: plumbing.NewHash("35e85108805c84807bc66a02d91535e1e24b38b9"), |
| 810 | }) |
| 811 | |
| 812 | c.Assert(err, Equals, ErrBranchHashExclusive) |
| 813 | } |
| 814 | |
| 815 | func (s *WorktreeSuite) TestCheckoutCreateMissingBranch(c *C) { |
| 816 | w := &Worktree{ |