Commit 20ec2d0
reset: make sparse-aware (except --mixed)
Remove `ensure_full_index` guard on `prime_cache_tree` and update
`prime_cache_tree_rec` to correctly reconstruct sparse directory entries in
the cache tree. While processing a tree's entries, `prime_cache_tree_rec`
must determine whether a directory entry is sparse or not by searching for
it in the index (*without* expanding the index). If a matching sparse
directory index entry is found, no subtrees are added to the cache tree
entry and the entry count is set to 1 (representing the sparse directory
itself). Otherwise, the tree is assumed to not be sparse and its subtrees
are recursively added to the cache tree.
Helped-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent c01b1cb commit 20ec2d0
File tree
4 files changed
+86
-13
lines changed- t
4 files changed
+86
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
743 | 751 | | |
744 | 752 | | |
745 | | - | |
| 753 | + | |
| 754 | + | |
746 | 755 | | |
747 | 756 | | |
748 | 757 | | |
749 | 758 | | |
| 759 | + | |
750 | 760 | | |
751 | 761 | | |
| 762 | + | |
752 | 763 | | |
753 | 764 | | |
754 | 765 | | |
| |||
757 | 768 | | |
758 | 769 | | |
759 | 770 | | |
| 771 | + | |
760 | 772 | | |
761 | 773 | | |
762 | 774 | | |
763 | 775 | | |
764 | | - | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
765 | 801 | | |
766 | 802 | | |
767 | 803 | | |
| 804 | + | |
768 | 805 | | |
769 | 806 | | |
770 | 807 | | |
771 | 808 | | |
772 | 809 | | |
773 | 810 | | |
774 | 811 | | |
| 812 | + | |
| 813 | + | |
775 | 814 | | |
776 | 815 | | |
777 | 816 | | |
778 | 817 | | |
779 | | - | |
780 | | - | |
| 818 | + | |
| 819 | + | |
781 | 820 | | |
782 | 821 | | |
783 | 822 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
819 | 829 | | |
820 | 830 | | |
821 | 831 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
551 | 556 | | |
552 | 557 | | |
553 | 558 | | |
554 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
555 | 563 | | |
556 | 564 | | |
557 | 565 | | |
| |||
570 | 578 | | |
571 | 579 | | |
572 | 580 | | |
573 | | - | |
| 581 | + | |
574 | 582 | | |
575 | 583 | | |
576 | 584 | | |
| |||
586 | 594 | | |
587 | 595 | | |
588 | 596 | | |
589 | | - | |
| 597 | + | |
590 | 598 | | |
591 | 599 | | |
592 | 600 | | |
| |||
595 | 603 | | |
596 | 604 | | |
597 | 605 | | |
598 | | - | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
599 | 612 | | |
600 | 613 | | |
601 | 614 | | |
| |||
1222 | 1235 | | |
1223 | 1236 | | |
1224 | 1237 | | |
1225 | | - | |
| 1238 | + | |
1226 | 1239 | | |
1227 | 1240 | | |
1228 | 1241 | | |
| |||
1322 | 1335 | | |
1323 | 1336 | | |
1324 | 1337 | | |
1325 | | - | |
| 1338 | + | |
1326 | 1339 | | |
1327 | 1340 | | |
1328 | 1341 | | |
| |||
1357 | 1370 | | |
1358 | 1371 | | |
1359 | 1372 | | |
1360 | | - | |
| 1373 | + | |
1361 | 1374 | | |
1362 | 1375 | | |
1363 | 1376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
780 | | - | |
| 780 | + | |
781 | 781 | | |
782 | | - | |
| 782 | + | |
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
| |||
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
792 | 803 | | |
793 | 804 | | |
794 | 805 | | |
| |||
0 commit comments