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

Function Repository_status_file

src/repository.c:1822–1840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1820 "Returns the status of the given file path.");
1821
1822PyObject *
1823Repository_status_file(Repository *self, PyObject *value)
1824{
1825 PyObject *tvalue;
1826 char *path = pgit_borrow_fsdefault(value, &tvalue);
1827 if (!path)
1828 return NULL;
1829
1830 unsigned int status;
1831 int err = git_status_file(&status, self->repo, path);
1832 if (err) {
1833 PyObject *err_obj = Error_set_str(err, path);
1834 Py_DECREF(tvalue);
1835 return err_obj;
1836 }
1837 Py_DECREF(tvalue);
1838
1839 return pygit2_enum(FileStatusEnum, (int) status);
1840}
1841
1842
1843PyDoc_STRVAR(Repository_TreeBuilder__doc__,

Callers

nothing calls this directly

Calls 3

pgit_borrow_fsdefaultFunction · 0.85
Error_set_strFunction · 0.85
pygit2_enumFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…