| 917 | "Create a new blob from a file anywhere (no working directory check)."); |
| 918 | |
| 919 | PyObject * |
| 920 | Repository_create_blob_fromdisk(Repository *self, PyObject *value) |
| 921 | { |
| 922 | PyObject *tvalue; |
| 923 | char *path = pgit_borrow_fsdefault(value, &tvalue); |
| 924 | if (path == NULL) |
| 925 | return NULL; |
| 926 | |
| 927 | git_oid oid; |
| 928 | int err = git_blob_create_fromdisk(&oid, self->repo, path); |
| 929 | Py_DECREF(tvalue); |
| 930 | |
| 931 | if (err < 0) |
| 932 | return Error_set(err); |
| 933 | |
| 934 | return git_oid_to_python(&oid); |
| 935 | } |
| 936 | |
| 937 | |
| 938 | #define BUFSIZE 4096 |
nothing calls this directly
no test coverage detected
searching dependent graphs…