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

Method TestSubmoduleParseScp

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

Source from the content-addressed store, hash-verified

271}
272
273func (s *SubmoduleSuite) TestSubmoduleParseScp(c *C) {
274 repo := &Repository{
275 Storer: memory.NewStorage(),
276 wt: memfs.New(),
277 }
278 worktree := &Worktree{
279 Filesystem: memfs.New(),
280 r: repo,
281 }
282 submodule := &Submodule{
283 initialized: true,
284 c: nil,
285 w: worktree,
286 }
287
288 submodule.c = &config.Submodule{
289 Path: "child",
290 URL: "git@github.com:username/submodule_repo",
291 }
292
293 _, err := submodule.Repository()
294 c.Assert(err, IsNil)
295}
296
297// newSubmoduleForRelativeURL constructs an in-memory Repository with
298// the given parent remote URL configured as origin, plus a Submodule

Callers

nothing calls this directly

Calls 2

RepositoryMethod · 0.95
NewStorageFunction · 0.92

Tested by

no test coverage detected