diff options
author | Taylor Blau <me@ttaylorr.com> | 2021-03-30 11:04:32 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-01 13:07:37 -0700 |
commit | 38ff7cabb6b8e51df78ce20c20632eba24265ee4 (patch) | |
tree | aacf2cb30864381b1a95d33aeb05125107ea7641 /t/helper/test-oidmap.c | |
parent | pack-write.c: extract 'write_rev_file_order' (diff) | |
download | tgif-38ff7cabb6b8e51df78ce20c20632eba24265ee4.tar.xz |
pack-revindex: write multi-pack reverse indexes
Implement the writing half of multi-pack reverse indexes. This is
nothing more than the format describe a few patches ago, with a new set
of helper functions that will be used to clear out stale .rev files
corresponding to old MIDXs.
Unfortunately, a very similar comparison function as the one implemented
recently in pack-revindex.c is reimplemented here, this time accepting a
MIDX-internal type. An effort to DRY these up would create more
indirection and overhead than is necessary, so it isn't pursued here.
Currently, there are no callers which pass the MIDX_WRITE_REV_INDEX
flag, meaning that this is all dead code. But, that won't be the case
for long, since subsequent patches will introduce the multi-pack bitmap,
which will begin passing this field.
(In midx.c:write_midx_internal(), the two adjacent if statements share a
conditional, but are written separately since the first one will
eventually also handle the MIDX_WRITE_BITMAP flag, which does not yet
exist.)
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-oidmap.c')
0 files changed, 0 insertions, 0 deletions