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

Method TestCheckoutSubmoduleInitialized

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

Source from the content-addressed store, hash-verified

657}
658
659func (s *WorktreeSuite) TestCheckoutSubmoduleInitialized(c *C) {
660 url := "https://github.com/git-fixtures/submodule.git"
661 r := s.NewRepository(fixtures.ByURL(url).One())
662
663 w, err := r.Worktree()
664 c.Assert(err, IsNil)
665
666 sub, err := w.Submodules()
667 c.Assert(err, IsNil)
668
669 err = sub.Update(&SubmoduleUpdateOptions{Init: true})
670 c.Assert(err, IsNil)
671
672 status, err := w.Status()
673 c.Assert(err, IsNil)
674 c.Assert(status.IsClean(), Equals, true)
675}
676
677func (s *WorktreeSuite) TestCheckoutRelativePathSubmoduleInitialized(c *C) {
678 url := "https://github.com/git-fixtures/submodule.git"

Callers

nothing calls this directly

Calls 6

WorktreeMethod · 0.95
NewRepositoryMethod · 0.80
SubmodulesMethod · 0.80
UpdateMethod · 0.45
StatusMethod · 0.45
IsCleanMethod · 0.45

Tested by

no test coverage detected