MCPcopy Create free account
hub / github.com/libgit2/pygit2 / Repository_notes

Function Repository_notes

src/repository.c:1954–1977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1952PyDoc_STRVAR(Repository_notes__doc__, "");
1953
1954PyObject *
1955Repository_notes(Repository *self, PyObject *args)
1956{
1957 char *ref = "refs/notes/commits";
1958 if (!PyArg_ParseTuple(args, "|s", &ref))
1959 return NULL;
1960
1961 NoteIter *iter = PyObject_New(NoteIter, &NoteIterType);
1962 if (iter == NULL)
1963 return NULL;
1964
1965 Py_INCREF(self);
1966 iter->repo = self;
1967 iter->ref = ref;
1968 iter->iter = NULL;
1969
1970 int err = git_note_iterator_new(&iter->iter, self->repo, iter->ref);
1971 if (err != GIT_OK) {
1972 Py_DECREF(iter);
1973 return Error_set(err);
1974 }
1975
1976 return (PyObject*)iter;
1977}
1978
1979
1980PyDoc_STRVAR(Repository_create_note__doc__,

Callers

nothing calls this directly

Calls 1

Error_setFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…