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

Function packfile_store_find_abbrev_len

packfile.c:2696–2719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2694}
2695
2696int packfile_store_find_abbrev_len(struct packfile_store *store,
2697 const struct object_id *oid,
2698 unsigned min_len,
2699 unsigned *out)
2700{
2701 struct packfile_list_entry *e;
2702 struct multi_pack_index *m;
2703
2704 m = get_multi_pack_index(store->source);
2705 if (m)
2706 find_abbrev_len_for_midx(m, oid, min_len, &min_len);
2707
2708 for (e = packfile_store_get_packs(store); e; e = e->next) {
2709 if (e->pack->multi_pack_index)
2710 continue;
2711 if (open_pack_index(e->pack) || !e->pack->num_objects)
2712 continue;
2713
2714 find_abbrev_len_for_pack(e->pack, oid, min_len, &min_len);
2715 }
2716
2717 *out = min_len;
2718 return 0;
2719}
2720
2721struct add_promisor_object_data {
2722 struct repository *repo;

Callers 1

Calls 5

get_multi_pack_indexFunction · 0.85
find_abbrev_len_for_midxFunction · 0.85
packfile_store_get_packsFunction · 0.85
open_pack_indexFunction · 0.85
find_abbrev_len_for_packFunction · 0.85

Tested by

no test coverage detected