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

Method TestCheckoutSubmoduleInitialized

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

Source from the content-addressed store, hash-verified

602}
603
604func (s *WorktreeSuite) TestCheckoutSubmoduleInitialized(c *C) {
605 url := "https://github.com/git-fixtures/submodule.git"
606 r := s.NewRepository(fixtures.ByURL(url).One())
607
608 w, err := r.Worktree()
609 c.Assert(err, IsNil)
610
611 sub, err := w.Submodules()
612 c.Assert(err, IsNil)
613
614 err = sub.Update(&SubmoduleUpdateOptions{Init: true})
615 c.Assert(err, IsNil)
616
617 status, err := w.Status()
618 c.Assert(err, IsNil)
619 c.Assert(status.IsClean(), Equals, true)
620}
621
622func (s *WorktreeSuite) TestCheckoutRelativePathSubmoduleInitialized(c *C) {
623 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