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

Method TestSubmodulesFetchDepth

submodule_test.go:236–263  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

234}
235
236func (s *SubmoduleSuite) TestSubmodulesFetchDepth(c *C) {
237 if testing.Short() {
238 c.Skip("skipping test in short mode.")
239 }
240
241 sm, err := s.Worktree.Submodule("basic")
242 c.Assert(err, IsNil)
243
244 err = sm.Update(&SubmoduleUpdateOptions{
245 Init: true,
246 Depth: 1,
247 })
248 c.Assert(err, IsNil)
249
250 r, err := sm.Repository()
251 c.Assert(err, IsNil)
252
253 lr, err := r.Log(&LogOptions{})
254 c.Assert(err, IsNil)
255
256 commitCount := 0
257 for _, err := lr.Next(); err == nil; _, err = lr.Next() {
258 commitCount++
259 }
260 c.Assert(err, IsNil)
261
262 c.Assert(commitCount, Equals, 1)
263}
264
265func (s *SubmoduleSuite) TestSubmoduleParseScp(c *C) {
266 repo := &Repository{

Callers

nothing calls this directly

Calls 7

ShortMethod · 0.80
SubmoduleMethod · 0.80
RepositoryMethod · 0.80
LogMethod · 0.80
SkipMethod · 0.65
NextMethod · 0.65
UpdateMethod · 0.45

Tested by

no test coverage detected