Commit cce99cd
commit-graph: writing missing parents is a BUG
When writing a commit-graph, we write GRAPH_MISSING_PARENT if the
parent's object id does not appear in the list of commits to be
written into the commit-graph. This was done as the initial design
allowed commits to have missing parents, but the final version
requires the commit-graph to be closed under reachability. Thus,
this GRAPH_MISSING_PARENT value should never be written.
However, there are reasons why it could be written! These range
from a bug in the reachable-closure code to a memory error causing
the binary search into the list of object ids to fail. In either
case, we should fail fast and avoid writing the commit-graph file
with bad data.
Remove the GRAPH_MISSING_PARENT constant in favor of the constant
GRAPH_EDGE_LAST_MASK, which has the same value.
Signed-off-by: Derrick Stolee <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 0d0ac38 commit cce99cd
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
496 | 495 | | |
497 | 496 | | |
498 | 497 | | |
499 | | - | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
| |||
514 | 515 | | |
515 | 516 | | |
516 | 517 | | |
517 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
518 | 521 | | |
519 | 522 | | |
520 | 523 | | |
| |||
567 | 570 | | |
568 | 571 | | |
569 | 572 | | |
570 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
571 | 576 | | |
572 | 577 | | |
573 | 578 | | |
| |||
864 | 869 | | |
865 | 870 | | |
866 | 871 | | |
867 | | - | |
| 872 | + | |
868 | 873 | | |
869 | 874 | | |
870 | 875 | | |
| |||
891 | 896 | | |
892 | 897 | | |
893 | 898 | | |
894 | | - | |
| 899 | + | |
895 | 900 | | |
896 | 901 | | |
897 | 902 | | |
| |||
0 commit comments