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

Function record_reused_object

builtin/pack-objects.c:1058–1068  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1056static int reused_chunks_alloc;
1057
1058static void record_reused_object(off_t where, off_t offset)
1059{
1060 if (reused_chunks_nr && reused_chunks[reused_chunks_nr-1].difference == offset)
1061 return;
1062
1063 ALLOC_GROW(reused_chunks, reused_chunks_nr + 1,
1064 reused_chunks_alloc);
1065 reused_chunks[reused_chunks_nr].original = where;
1066 reused_chunks[reused_chunks_nr].difference = offset;
1067 reused_chunks_nr++;
1068}
1069
1070/*
1071 * Binary search to find the chunk that "where" is in. Note

Callers 2

write_reused_pack_oneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected