diff options
author | Taylor Blau <me@ttaylorr.com> | 2021-01-25 18:37:18 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-25 18:32:43 -0800 |
commit | 8ef50d9958f7be21e38026433d30f72521b4de47 (patch) | |
tree | b653d9be420dde954169b0af92ebf331ff607deb /diffcore-delta.c | |
parent | packfile: prepare for the existence of '*.rev' files (diff) | |
download | tgif-8ef50d9958f7be21e38026433d30f72521b4de47.tar.xz |
pack-write.c: prepare to write 'pack-*.rev' files
This patch prepares for callers to be able to write reverse index files
to disk.
It adds the necessary machinery to write a format-compliant .rev file
from within 'write_rev_file()', which is called from
'finish_tmp_packfile()'.
Similar to the process by which the reverse index is computed in memory,
these new paths also have to sort a list of objects by their offsets
within a packfile. These new paths use a qsort() (as opposed to a radix
sort), since our specialized radix sort requires a full revindex_entry
struct per object, which is more memory than we need to allocate.
The qsort is obviously slower, but the theoretical slowdown would
require a repository with a large amount of objects, likely implying
that the time spent in, say, pack-objects during a repack would dominate
the overall runtime.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore-delta.c')
0 files changed, 0 insertions, 0 deletions