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

Function insert_file_table

diffcore-rename.c:326–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326static void insert_file_table(struct repository *r,
327 struct mem_pool *pool,
328 struct hashmap *table, int index,
329 struct diff_filespec *filespec)
330{
331 struct file_similarity *entry = mem_pool_alloc(pool, sizeof(*entry));
332
333 entry->index = index;
334 entry->filespec = filespec;
335
336 hashmap_entry_init(&entry->entry, hash_filespec(r, filespec));
337 hashmap_add(table, &entry->entry);
338}
339
340/*
341 * Find exact renames first.

Callers 1

find_exact_renamesFunction · 0.85

Calls 4

mem_pool_allocFunction · 0.85
hashmap_entry_initFunction · 0.85
hash_filespecFunction · 0.85
hashmap_addFunction · 0.85

Tested by

no test coverage detected