| 276 | PyDoc_STRVAR(Commit_parent_ids__doc__, "The list of parent commits' ids."); |
| 277 | |
| 278 | PyObject * |
| 279 | Commit_parent_ids__get__(Commit *self) |
| 280 | { |
| 281 | unsigned int i, parent_count; |
| 282 | const git_oid *id; |
| 283 | PyObject *list; |
| 284 | |
| 285 | if (Object__load((Object*)self) == NULL) { return NULL; } // Lazy load |
| 286 | |
| 287 | parent_count = git_commit_parentcount(self->commit); |
| 288 | list = PyList_New(parent_count); |
| 289 | if (!list) |
| 290 | return NULL; |
| 291 | |
| 292 | for (i=0; i < parent_count; i++) { |
| 293 | id = git_commit_parent_id(self->commit, i); |
| 294 | PyList_SET_ITEM(list, i, git_oid_to_python(id)); |
| 295 | } |
| 296 | |
| 297 | return list; |
| 298 | } |
| 299 | |
| 300 | PyGetSetDef Commit_getseters[] = { |
| 301 | GETTER(Commit, message_encoding), |
nothing calls this directly
no test coverage detected
searching dependent graphs…