Commit a0dee3f
packed-backend: extract snapshot allocation in
"load_contents" would choose which way to load the content of the
"packed-refs". However, we cannot directly use this function when
checking the consistency due to we don't want to open the file. And we
also need to reuse the logic to avoid causing repetition.
Let's create a new helper function "allocate_snapshot_buffer" to extract
the snapshot allocation logic in "load_contents" and update the
"load_contents" to align with the behavior.
Suggested-by: Jeff King <[email protected]>
Suggested-by: Patrick Steinhardt <[email protected]>
Signed-off-by: shejialuo <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>load_contents
1 parent 784cecc commit a0dee3f
1 file changed
+31
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
520 | 546 | | |
521 | 547 | | |
522 | 548 | | |
| |||
525 | 551 | | |
526 | 552 | | |
527 | 553 | | |
528 | | - | |
529 | 554 | | |
530 | | - | |
531 | | - | |
| 555 | + | |
| 556 | + | |
532 | 557 | | |
533 | 558 | | |
534 | 559 | | |
| |||
550 | 575 | | |
551 | 576 | | |
552 | 577 | | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | 578 | | |
570 | | - | |
571 | | - | |
| 579 | + | |
572 | 580 | | |
573 | | - | |
| 581 | + | |
| 582 | + | |
574 | 583 | | |
575 | 584 | | |
576 | 585 | | |
| |||
0 commit comments