diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2019-06-10 16:35:24 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-11 10:34:40 -0700 |
commit | dba6175c64cdc9485198395b4c3c715fd2402230 (patch) | |
tree | 107c9b48ad704944f2c56d0f65a44a9bb355651b /connect.h | |
parent | multi-pack-index: prepare for 'expire' subcommand (diff) | |
download | tgif-dba6175c64cdc9485198395b4c3c715fd2402230.tar.xz |
midx: simplify computation of pack name lengths
Before writing the multi-pack-index, we compute the length of the
pack-index names concatenated together. This forms the data in the
pack name chunk, and we precompute it to compute chunk offsets.
The value is also modified to fit alignment needs.
Previously, this computation was coupled with adding packs from
the existing multi-pack-index and the remaining packs in the object
dir not already covered by the multi-pack-index.
In anticipation of this becoming more complicated with the 'expire'
subcommand, simplify the computation by centralizing it to a single
loop before writing the file.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'connect.h')
0 files changed, 0 insertions, 0 deletions