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

Method TestCheckoutSubmodule

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

Source from the content-addressed store, hash-verified

642}
643
644func (s *WorktreeSuite) TestCheckoutSubmodule(c *C) {
645 url := "https://github.com/git-fixtures/submodule.git"
646 r := s.NewRepositoryWithEmptyWorktree(fixtures.ByURL(url).One())
647
648 w, err := r.Worktree()
649 c.Assert(err, IsNil)
650
651 err = w.Checkout(&CheckoutOptions{})
652 c.Assert(err, IsNil)
653
654 status, err := w.Status()
655 c.Assert(err, IsNil)
656 c.Assert(status.IsClean(), Equals, true)
657}
658
659func (s *WorktreeSuite) TestCheckoutSubmoduleInitialized(c *C) {
660 url := "https://github.com/git-fixtures/submodule.git"

Callers

nothing calls this directly

Calls 5

WorktreeMethod · 0.80
CheckoutMethod · 0.80
StatusMethod · 0.45
IsCleanMethod · 0.45

Tested by

no test coverage detected