| 125 | } |
| 126 | |
| 127 | struct patch_id *add_commit_patch_id(struct commit *commit, |
| 128 | struct patch_ids *ids) |
| 129 | { |
| 130 | struct patch_id *key; |
| 131 | |
| 132 | if (!patch_id_defined(commit)) |
| 133 | return NULL; |
| 134 | |
| 135 | CALLOC_ARRAY(key, 1); |
| 136 | if (init_patch_id_entry(key, commit, ids)) { |
| 137 | free(key); |
| 138 | return NULL; |
| 139 | } |
| 140 | |
| 141 | hashmap_add(&ids->patches, &key->ent); |
| 142 | return key; |
| 143 | } |
no test coverage detected