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

Method TestRefSpecIsDelete

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

Source from the content-addressed store, hash-verified

54}
55
56func (s *RefSpecSuite) TestRefSpecIsDelete(c *C) {
57 spec := RefSpec(":refs/heads/master")
58 c.Assert(spec.IsDelete(), Equals, true)
59
60 spec = RefSpec("+refs/heads/*:refs/remotes/origin/*")
61 c.Assert(spec.IsDelete(), Equals, false)
62
63 spec = RefSpec("refs/heads/*:refs/remotes/origin/*")
64 c.Assert(spec.IsDelete(), Equals, false)
65}
66
67func (s *RefSpecSuite) TestRefSpecIsExactSHA1(c *C) {
68 spec := RefSpec("foo:refs/heads/master")

Callers

nothing calls this directly

Calls 2

RefSpecTypeAlias · 0.85
IsDeleteMethod · 0.80

Tested by

no test coverage detected