Commit 1784522
midx: drop unused parameters from add_midx_to_chain()
When loading a chained midx, we build up an array of hashes, one per
layer of the chain. But since the chain is also represented by the
linked list of multi_pack_index structs, nobody actually reads this
array. We pass it to add_midx_to_chain(), but the parameters are
completely ignored.
So we can drop those unused parameters. And then we can see that its
sole caller, load_midx_chain_fd_st(), only cares about one layer hash at a
time (for parsing each line and feeding it to the single-layer midx
code). So we can replace the array with a single object_id on the stack.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent fcb2205 commit 1784522
1 file changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
268 | | - | |
269 | | - | |
| 267 | + | |
270 | 268 | | |
271 | 269 | | |
272 | 270 | | |
| |||
300 | 298 | | |
301 | 299 | | |
302 | 300 | | |
303 | | - | |
304 | 301 | | |
305 | 302 | | |
306 | 303 | | |
307 | 304 | | |
308 | 305 | | |
309 | | - | |
310 | 306 | | |
311 | 307 | | |
312 | 308 | | |
| 309 | + | |
313 | 310 | | |
314 | 311 | | |
315 | 312 | | |
316 | 313 | | |
317 | | - | |
| 314 | + | |
318 | 315 | | |
319 | 316 | | |
320 | 317 | | |
| |||
325 | 322 | | |
326 | 323 | | |
327 | 324 | | |
328 | | - | |
| 325 | + | |
329 | 326 | | |
330 | 327 | | |
331 | 328 | | |
332 | 329 | | |
333 | | - | |
| 330 | + | |
334 | 331 | | |
335 | 332 | | |
336 | 333 | | |
| |||
343 | 340 | | |
344 | 341 | | |
345 | 342 | | |
346 | | - | |
347 | 343 | | |
348 | 344 | | |
349 | 345 | | |
| |||
0 commit comments