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

Function Repository_create_blob

src/repository.c:869–885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

867 "object database. Returns the oid of the blob.");
868
869PyObject *
870Repository_create_blob(Repository *self, PyObject *args)
871{
872 git_oid oid;
873 const char *raw;
874 Py_ssize_t size;
875 int err;
876
877 if (!PyArg_ParseTuple(args, "s#", &raw, &size))
878 return NULL;
879
880 err = git_blob_create_frombuffer(&oid, self->repo, (const void*)raw, size);
881 if (err < 0)
882 return Error_set(err);
883
884 return git_oid_to_python(&oid);
885}
886
887
888PyDoc_STRVAR(Repository_create_blob_fromworkdir__doc__,

Callers

nothing calls this directly

Calls 2

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…