Commit 83296d2
pack-bitmap: return multiple packs via
Further prepare for enabling verbatim pack-reuse over multiple packfiles
by changing the signature of reuse_partial_packfile_from_bitmap() to
populate an array of `struct bitmapped_pack *`'s instead of a pointer to
a single packfile.
Since the array we're filling out is sized dynamically[^1], add an
additional `size_t *` parameter which will hold the number of reusable
packs (equal to the number of elements in the array).
Note that since we still have not implemented true multi-pack reuse,
these changes aren't propagated out to the rest of the caller in
builtin/pack-objects.c.
In the interim state, we expect that the array has a single element, and
we use that element to fill out the static `reuse_packfile` variable
(which is a bog-standard `struct packed_git *`). Future commits will
continue to push this change further out through the pack-objects code.
[^1]: That is, even though we know the number of packs which are
candidates for pack-reuse, we do not know how many of those
candidates we can actually reuse.
Signed-off-by: Taylor Blau <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>reuse_partial_packfile_from_bitmap()
1 parent 35e156b commit 83296d2
3 files changed
+14
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3940 | 3940 | | |
3941 | 3941 | | |
3942 | 3942 | | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
3943 | 3946 | | |
3944 | 3947 | | |
3945 | 3948 | | |
3946 | 3949 | | |
3947 | | - | |
| 3950 | + | |
| 3951 | + | |
3948 | 3952 | | |
3949 | 3953 | | |
3950 | | - | |
| 3954 | + | |
| 3955 | + | |
3951 | 3956 | | |
3952 | 3957 | | |
3953 | 3958 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2001 | 2001 | | |
2002 | 2002 | | |
2003 | 2003 | | |
2004 | | - | |
| 2004 | + | |
| 2005 | + | |
2005 | 2006 | | |
2006 | 2007 | | |
2007 | 2008 | | |
| |||
2069 | 2070 | | |
2070 | 2071 | | |
2071 | 2072 | | |
2072 | | - | |
| 2073 | + | |
| 2074 | + | |
2073 | 2075 | | |
2074 | 2076 | | |
2075 | 2077 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
0 commit comments