MCPcopy Create free account
hub / github.com/git/git / mark_path

Function mark_path

builtin/last-modified.c:184–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184static 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
209static void last_modified_diff(struct diff_queue_struct *q,
210 struct diff_options *opt UNUSED, void *cbdata)

Callers 2

last_modified_diffFunction · 0.85
last_modified_runFunction · 0.85

Calls 5

strhashFunction · 0.85
oideqFunction · 0.85
last_modified_emitFunction · 0.85
hashmap_removeFunction · 0.85
bloom_key_clearFunction · 0.85

Tested by

no test coverage detected