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

Method TestCheckoutBranchAndHash

worktree_test.go:801–813  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

799}
800
801func (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
815func (s *WorktreeSuite) TestCheckoutCreateMissingBranch(c *C) {
816 w := &Worktree{

Callers

nothing calls this directly

Calls 2

CheckoutMethod · 0.95
NewHashFunction · 0.92

Tested by

no test coverage detected