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

Function midx_compaction_step_base

repack-midx.c:411–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409};
410
411static const char *midx_compaction_step_base(const struct midx_compaction_step *step)
412{
413 switch (step->type) {
414 case MIDX_COMPACTION_STEP_UNKNOWN:
415 BUG("cannot use UNKNOWN step as a base");
416 case MIDX_COMPACTION_STEP_COPY:
417 return midx_get_checksum_hex(step->u.copy);
418 case MIDX_COMPACTION_STEP_WRITE:
419 BUG("cannot use WRITE step as a base");
420 case MIDX_COMPACTION_STEP_COMPACT:
421 return midx_get_checksum_hex(step->u.compact.to);
422 default:
423 BUG("unhandled midx compaction step type %d", step->type);
424 }
425}
426
427static int midx_compaction_step_exec_copy(struct midx_compaction_step *step)
428{

Callers 1

write_midx_incrementalFunction · 0.85

Calls 1

midx_get_checksum_hexFunction · 0.85

Tested by

no test coverage detected