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

Function AssertReferences

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

Source from the content-addressed store, hash-verified

198}
199
200func AssertReferences(c *C, r *Repository, expected map[string]string) {
201 for name, target := range expected {
202 expected := plumbing.NewReferenceFromStrings(name, target)
203
204 obtained, err := r.Reference(expected.Name(), true)
205 c.Assert(err, IsNil)
206
207 c.Assert(obtained, DeepEquals, expected)
208 }
209}
210
211func AssertReferencesMissing(c *C, r *Repository, expected []string) {
212 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…