summaryrefslogtreecommitdiff
path: root/t/t9133-git-svn-nested-git-repo.sh
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2022-08-22 15:50:38 -0400
committerJunio C Hamano <gitster@pobox.com>2022-08-22 13:04:22 -0700
commit989d9cbd5c32fad54391a4ed06b1271f0a891077 (patch)
treede5e4f23fd3f8a57808b10e183d95a156fed22d8 /t/t9133-git-svn-nested-git-repo.sh
parent0b6203c4efb9eb81e0c63998aece8a3ec7ab3a16 (diff)
midx.c: extract `struct midx_fanout`
To build up a list of objects (along with their packs, and the offsets within those packs that each object appears at), the MIDX code implements `get_sorted_entries()` which builds up a list of candidates, sorts them, and then removes duplicate entries. To do this, it keeps an array of `pack_midx_entry` structures that it builds up once for each fanout level (ie., for all possible values of the first byte of each object's ID). This array is a function-local variable of `get_sorted_entries()`. Since it uses the ALLOC_GROW() macro, having the `alloc_fanout` variable also be local to that function, and only modified within that function is convenient. However, subsequent changes will extract the two ways this array is filled (from a pack at some fanout value, and from an existing MIDX at some fanout value) into separate functions. Instead of passing around pointers to the entries array, along with `nr_fanout` and `alloc_fanout`, encapsulate these three into a structure instead. Then pass around a pointer to this structure instead. This patch does not yet extract the above two functions, but sets us up to begin doing so in the following commit. For now, the implementation of get_sorted_entries() is only modified to replace `entries_by_fanout` with `fanout.entries`, `nr_fanout` with `fanout.nr`, and so on. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9133-git-svn-nested-git-repo.sh')
0 files changed, 0 insertions, 0 deletions