| 178 | "Returns the byte string with the raw contents of the object."); |
| 179 | |
| 180 | PyObject * |
| 181 | Object_read_raw(Object *self) |
| 182 | { |
| 183 | int err; |
| 184 | git_odb *odb; |
| 185 | PyObject *aux; |
| 186 | |
| 187 | err = git_repository_odb(&odb, self->repo->repo); |
| 188 | if (err < 0) |
| 189 | return Error_set(err); |
| 190 | |
| 191 | const git_oid *oid = Object__id(self); |
| 192 | git_odb_object *obj = Odb_read_raw(odb, oid, GIT_OID_HEXSZ); |
| 193 | git_odb_free(odb); |
| 194 | if (obj == NULL) |
| 195 | return NULL; |
| 196 | |
| 197 | aux = PyBytes_FromStringAndSize( |
| 198 | git_odb_object_data(obj), |
| 199 | git_odb_object_size(obj)); |
| 200 | |
| 201 | git_odb_object_free(obj); |
| 202 | return aux; |
| 203 | } |
| 204 | |
| 205 | PyDoc_STRVAR(Object_peel__doc__, |
| 206 | "peel(target_type) -> Object\n" |
nothing calls this directly
no test coverage detected
searching dependent graphs…