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

Function AssertReferences

common_test.go:219–228  ·  view source on GitHub ↗
(c *C, r *Repository, expected map[string]string)

Source from the content-addressed store, hash-verified

217}
218
219func AssertReferences(c *C, r *Repository, expected map[string]string) {
220 for name, target := range expected {
221 expected := plumbing.NewReferenceFromStrings(name, target)
222
223 obtained, err := r.Reference(expected.Name(), true)
224 c.Assert(err, IsNil)
225
226 c.Assert(obtained, DeepEquals, expected)
227 }
228}
229
230func AssertReferencesMissing(c *C, r *Repository, expected []string) {
231 for _, name := range expected {

Callers 11

TestPushMethod · 0.85
TestPushWithProgressMethod · 0.85
TestPushDepthMethod · 0.85
TestPushTagsMethod · 0.85
TestPushFollowTagsMethod · 0.85
TestPushPruneMethod · 0.85
TestPushNewReferenceMethod · 0.85
TestFetchPruneMethod · 0.85
TestFetchPruneTagsMethod · 0.85

Calls 3

NewReferenceFromStringsFunction · 0.92
ReferenceMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected