Commit 5e29c3f
pack-objects: parameterize pack-reuse routines over a single pack
The routines pack-objects uses to perform verbatim pack-reuse are:
- write_reused_pack_one()
- write_reused_pack_verbatim()
- write_reused_pack()
, all of which assume that there is exactly one packfile being reused:
the global constant `reuse_packfile`.
Prepare for reusing objects from multiple packs by making reuse packfile
a parameter of each of the above functions in preparation for calling
these functions in a loop with multiple packfiles.
Note that we still have the global "reuse_packfile", but pass it through
each of the above function's parameter lists, eliminating all but one
direct access (the top-level caller in `write_pack_file()`). Even after
this series, we will still have a global, but it will hold the array of
reusable packfiles, and we'll pass them one at a time to these functions
in a loop.
Note also that we will eventually need to pass a `bitmapped_pack`
instead of a `packed_git` in order to hold onto additional information
required for reuse (such as the bit position of the first object
belonging to that pack). But that change will be made in a future commit
so as to minimize the noise below as much as possible.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 83296d2 commit 5e29c3f
1 file changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
1016 | | - | |
| 1016 | + | |
| 1017 | + | |
1017 | 1018 | | |
1018 | 1019 | | |
1019 | 1020 | | |
| |||
1091 | 1092 | | |
1092 | 1093 | | |
1093 | 1094 | | |
1094 | | - | |
| 1095 | + | |
| 1096 | + | |
1095 | 1097 | | |
1096 | 1098 | | |
1097 | 1099 | | |
| |||
1118 | 1120 | | |
1119 | 1121 | | |
1120 | 1122 | | |
1121 | | - | |
| 1123 | + | |
| 1124 | + | |
1122 | 1125 | | |
1123 | 1126 | | |
1124 | 1127 | | |
1125 | 1128 | | |
1126 | 1129 | | |
1127 | 1130 | | |
1128 | | - | |
| 1131 | + | |
1129 | 1132 | | |
1130 | 1133 | | |
1131 | 1134 | | |
| |||
1141 | 1144 | | |
1142 | 1145 | | |
1143 | 1146 | | |
1144 | | - | |
| 1147 | + | |
| 1148 | + | |
1145 | 1149 | | |
1146 | 1150 | | |
1147 | 1151 | | |
| |||
1199 | 1203 | | |
1200 | 1204 | | |
1201 | 1205 | | |
1202 | | - | |
| 1206 | + | |
1203 | 1207 | | |
1204 | 1208 | | |
1205 | 1209 | | |
| |||
0 commit comments