MCPcopy Index your code
hub / github.com/go-git/go-git / TestRefSpecSrc

Method TestRefSpecSrc

config/refspec_test.go:75–90  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

73}
74
75func (s *RefSpecSuite) TestRefSpecSrc(c *C) {
76 spec := RefSpec("refs/heads/*:refs/remotes/origin/*")
77 c.Assert(spec.Src(), Equals, "refs/heads/*")
78
79 spec = RefSpec("+refs/heads/*:refs/remotes/origin/*")
80 c.Assert(spec.Src(), Equals, "refs/heads/*")
81
82 spec = RefSpec(":refs/heads/master")
83 c.Assert(spec.Src(), Equals, "")
84
85 spec = RefSpec("refs/heads/love+hate:refs/heads/love+hate")
86 c.Assert(spec.Src(), Equals, "refs/heads/love+hate")
87
88 spec = RefSpec("+refs/heads/love+hate:refs/heads/love+hate")
89 c.Assert(spec.Src(), Equals, "refs/heads/love+hate")
90}
91
92func (s *RefSpecSuite) TestRefSpecMatch(c *C) {
93 spec := RefSpec("refs/heads/master:refs/remotes/origin/master")

Callers

nothing calls this directly

Calls 2

RefSpecTypeAlias · 0.85
SrcMethod · 0.80

Tested by

no test coverage detected