(c *C)
| 886 | } |
| 887 | |
| 888 | func (s *WorktreeSuite) TestCheckoutBranchAndHash(c *C) { |
| 889 | w := &Worktree{ |
| 890 | r: s.Repository, |
| 891 | Filesystem: memfs.New(), |
| 892 | } |
| 893 | |
| 894 | err := w.Checkout(&CheckoutOptions{ |
| 895 | Branch: "refs/heads/foo", |
| 896 | Hash: plumbing.NewHash("35e85108805c84807bc66a02d91535e1e24b38b9"), |
| 897 | }) |
| 898 | |
| 899 | c.Assert(err, Equals, ErrBranchHashExclusive) |
| 900 | } |
| 901 | |
| 902 | func (s *WorktreeSuite) TestCheckoutCreateMissingBranch(c *C) { |
| 903 | w := &Worktree{ |