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

Method TestRepositoryRelativeURLSSHParent

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

Source from the content-addressed store, hash-verified

341}
342
343func (s *SubmoduleSuite) TestRepositoryRelativeURLSSHParent(c *C) {
344 sm := newSubmoduleForRelativeURL(c,
345 "ssh://git@example.invalid/group/proj.git", "basic", "../X.git")
346
347 r, err := sm.Repository()
348 c.Assert(err, IsNil)
349
350 remotes, err := r.Remotes()
351 c.Assert(err, IsNil)
352 c.Assert(remotes, HasLen, 1)
353 c.Assert(remotes[0].Config().URLs[0], Equals,
354 "ssh://git@example.invalid/group/X.git")
355}
356
357func (s *SubmoduleSuite) TestRepositoryRelativeURLDeepTraversal(c *C) {
358 sm := newSubmoduleForRelativeURL(c,

Callers

nothing calls this directly

Calls 4

RepositoryMethod · 0.80
RemotesMethod · 0.80
ConfigMethod · 0.65

Tested by

no test coverage detected