MCPcopy
hub / github.com/go-git/go-git / TestCheckoutCreateMissingBranch

Method TestCheckoutCreateMissingBranch

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

Source from the content-addressed store, hash-verified

900}
901
902func (s *WorktreeSuite) TestCheckoutCreateMissingBranch(c *C) {
903 w := &Worktree{
904 r: s.Repository,
905 Filesystem: memfs.New(),
906 }
907
908 err := w.Checkout(&CheckoutOptions{
909 Create: true,
910 })
911
912 c.Assert(err, Equals, ErrCreateRequiresBranch)
913}
914
915func (s *WorktreeSuite) TestCheckoutCreateInvalidBranch(c *C) {
916 w := &Worktree{

Callers

nothing calls this directly

Calls 1

CheckoutMethod · 0.95

Tested by

no test coverage detected