| 182 | } |
| 183 | |
| 184 | static void mark_path(const char *path, const struct object_id *oid, |
| 185 | struct last_modified_callback_data *data) |
| 186 | { |
| 187 | struct last_modified_entry *ent; |
| 188 | |
| 189 | /* Is it even a path that we are interested in? */ |
| 190 | ent = hashmap_get_entry_from_hash(&data->lm->paths, strhash(path), path, |
| 191 | struct last_modified_entry, hashent); |
| 192 | if (!ent) |
| 193 | return; |
| 194 | |
| 195 | /* |
| 196 | * Is it arriving at a version of interest, or is it from a side branch |
| 197 | * which did not contribute to the final state? |
| 198 | */ |
| 199 | if (oid && !oideq(oid, &ent->oid)) |
| 200 | return; |
| 201 | |
| 202 | last_modified_emit(data->lm, path, data->commit); |
| 203 | |
| 204 | hashmap_remove(&data->lm->paths, &ent->hashent, path); |
| 205 | bloom_key_clear(&ent->key); |
| 206 | free(ent); |
| 207 | } |
| 208 | |
| 209 | static void last_modified_diff(struct diff_queue_struct *q, |
| 210 | struct diff_options *opt UNUSED, void *cbdata) |
no test coverage detected