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

Method Notes

repository.go:1396–1406  ·  view source on GitHub ↗

Notes returns all the References that are notes. For more information: https://git-scm.com/docs/git-notes

()

Source from the content-addressed store, hash-verified

1394// Notes returns all the References that are notes. For more information:
1395// https://git-scm.com/docs/git-notes
1396func (r *Repository) Notes() (storer.ReferenceIter, error) {
1397 refIter, err := r.Storer.IterReferences()
1398 if err != nil {
1399 return nil, err
1400 }
1401
1402 return storer.NewReferenceFilteredIter(
1403 func(r *plumbing.Reference) bool {
1404 return r.Name().IsNote()
1405 }, refIter), nil
1406}
1407
1408// TreeObject return a Tree with the given hash. If not found
1409// plumbing.ErrObjectNotFound is returned

Callers 1

TestNotesMethod · 0.80

Calls 4

NewReferenceFilteredIterFunction · 0.92
IsNoteMethod · 0.80
IterReferencesMethod · 0.65
NameMethod · 0.65

Tested by 1

TestNotesMethod · 0.64