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

Function mark_ce_used_same_name

unpack-trees.c:651–665  ·  view source on GitHub ↗

* We call unpack_index_entry() with an unmerged cache entry * only in diff-index, and it wants a single callback. Skip * the other unmerged entry with the same name. */

Source from the content-addressed store, hash-verified

649 * the other unmerged entry with the same name.
650 */
651static void mark_ce_used_same_name(struct cache_entry *ce,
652 struct unpack_trees_options *o)
653{
654 struct index_state *index = o->src_index;
655 int len = ce_namelen(ce);
656 int pos;
657
658 for (pos = locate_in_src_index(ce, o); pos < index->cache_nr; pos++) {
659 struct cache_entry *next = index->cache[pos];
660 if (len != ce_namelen(next) ||
661 memcmp(ce->name, next->name, len))
662 break;
663 mark_ce_used(next, o);
664 }
665}
666
667static struct cache_entry *next_cache_entry(struct unpack_trees_options *o)
668{

Callers 2

unpack_index_entryFunction · 0.85
unpack_callbackFunction · 0.85

Calls 2

locate_in_src_indexFunction · 0.85
mark_ce_usedFunction · 0.85

Tested by

no test coverage detected