Commit 5284fc5
commit/revisions: bookkeeping before refactoring
There are a few things that need to move around a little before
making a big refactoring in the topo-order logic:
1. We need access to record_author_date() and
compare_commits_by_author_date() in revision.c. These are used
currently by sort_in_topological_order() in commit.c.
2. Moving these methods to commit.h requires adding an author_date_slab
declaration to commit.h. Consumers will need their own implementation.
3. The add_parents_to_list() method in revision.c performs logic
around the UNINTERESTING flag and other special cases depending
on the struct rev_info. Allow this method to ignore a NULL 'list'
parameter, as we will not be populating the list for our walk.
Also rename the method to the slightly more generic name
process_parents() to make clear that this method does more than
add to a list (and no list is required anymore).
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent f0d9cc4 commit 5284fc5
3 files changed
+21
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
658 | | - | |
659 | 658 | | |
660 | 659 | | |
661 | | - | |
662 | | - | |
| 660 | + | |
| 661 | + | |
663 | 662 | | |
664 | 663 | | |
665 | 664 | | |
| |||
684 | 683 | | |
685 | 684 | | |
686 | 685 | | |
687 | | - | |
688 | | - | |
| 686 | + | |
| 687 | + | |
689 | 688 | | |
690 | 689 | | |
691 | 690 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
328 | 329 | | |
329 | 330 | | |
330 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
331 | 338 | | |
332 | 339 | | |
333 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
772 | | - | |
| 771 | + | |
| 772 | + | |
773 | 773 | | |
774 | 774 | | |
775 | 775 | | |
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
811 | | - | |
| 811 | + | |
| 812 | + | |
812 | 813 | | |
813 | 814 | | |
814 | 815 | | |
| |||
847 | 848 | | |
848 | 849 | | |
849 | 850 | | |
850 | | - | |
| 851 | + | |
| 852 | + | |
851 | 853 | | |
852 | 854 | | |
853 | 855 | | |
| |||
1091 | 1093 | | |
1092 | 1094 | | |
1093 | 1095 | | |
1094 | | - | |
| 1096 | + | |
1095 | 1097 | | |
1096 | 1098 | | |
1097 | 1099 | | |
| |||
2913 | 2915 | | |
2914 | 2916 | | |
2915 | 2917 | | |
2916 | | - | |
| 2918 | + | |
2917 | 2919 | | |
2918 | 2920 | | |
2919 | 2921 | | |
| |||
2979 | 2981 | | |
2980 | 2982 | | |
2981 | 2983 | | |
2982 | | - | |
| 2984 | + | |
2983 | 2985 | | |
2984 | 2986 | | |
2985 | 2987 | | |
| |||
3312 | 3314 | | |
3313 | 3315 | | |
3314 | 3316 | | |
3315 | | - | |
| 3317 | + | |
3316 | 3318 | | |
3317 | 3319 | | |
3318 | 3320 | | |
| |||
0 commit comments