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

Method TestCheckoutSubmodule

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

Source from the content-addressed store, hash-verified

587}
588
589func (s *WorktreeSuite) TestCheckoutSubmodule(c *C) {
590 url := "https://github.com/git-fixtures/submodule.git"
591 r := s.NewRepositoryWithEmptyWorktree(fixtures.ByURL(url).One())
592
593 w, err := r.Worktree()
594 c.Assert(err, IsNil)
595
596 err = w.Checkout(&CheckoutOptions{})
597 c.Assert(err, IsNil)
598
599 status, err := w.Status()
600 c.Assert(err, IsNil)
601 c.Assert(status.IsClean(), Equals, true)
602}
603
604func (s *WorktreeSuite) TestCheckoutSubmoduleInitialized(c *C) {
605 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