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

Function Repository_create_blob_fromworkdir

src/repository.c:895–911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

893 "is raised.");
894
895PyObject *
896Repository_create_blob_fromworkdir(Repository *self, PyObject *value)
897{
898 PyObject *tvalue;
899 char *path = pgit_borrow_fsdefault(value, &tvalue);
900 if (path == NULL)
901 return NULL;
902
903 git_oid oid;
904 int err = git_blob_create_fromworkdir(&oid, self->repo, path);
905 Py_DECREF(tvalue);
906
907 if (err < 0)
908 return Error_set(err);
909
910 return git_oid_to_python(&oid);
911}
912
913
914PyDoc_STRVAR(Repository_create_blob_fromdisk__doc__,

Callers

nothing calls this directly

Calls 3

pgit_borrow_fsdefaultFunction · 0.85
Error_setFunction · 0.85
git_oid_to_pythonFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…