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

Method TestRefSpecIsExactSHA1

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

Source from the content-addressed store, hash-verified

65}
66
67func (s *RefSpecSuite) TestRefSpecIsExactSHA1(c *C) {
68 spec := RefSpec("foo:refs/heads/master")
69 c.Assert(spec.IsExactSHA1(), Equals, false)
70
71 spec = RefSpec("12039e008f9a4e3394f3f94f8ea897785cb09448:refs/heads/foo")
72 c.Assert(spec.IsExactSHA1(), Equals, true)
73}
74
75func (s *RefSpecSuite) TestRefSpecSrc(c *C) {
76 spec := RefSpec("refs/heads/*:refs/remotes/origin/*")

Callers

nothing calls this directly

Calls 2

RefSpecTypeAlias · 0.85
IsExactSHA1Method · 0.80

Tested by

no test coverage detected