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

Function TreeBuilder_insert

src/treebuilder.c:58–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 " FileMode.TREE, FileMode.LINK and FileMode.COMMIT.\n");
57
58PyObject *
59TreeBuilder_insert(TreeBuilder *self, PyObject *args)
60{
61 PyObject *py_oid;
62 size_t len;
63 int err, attr;
64 git_oid oid;
65 const char *fname;
66
67 if (!PyArg_ParseTuple(args, "sOi", &fname, &py_oid, &attr))
68 return NULL;
69
70 len = py_oid_to_git_oid(py_oid, &oid);
71 if (len == 0)
72 return NULL;
73
74 err = git_treebuilder_insert(NULL, self->bld, fname, &oid, attr);
75 if (err < 0)
76 return Error_set(err);
77
78 Py_RETURN_NONE;
79}
80
81
82PyDoc_STRVAR(TreeBuilder_write__doc__,

Callers

nothing calls this directly

Calls 2

py_oid_to_git_oidFunction · 0.85
Error_setFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…