2 ancestry: of commits, a partial order
3 C > D C is a descendant of D
4 inclusion: commit includes change made in another
5 a partial order, consistent with ancestry but more partial
9 define convenience function
10 cont(C) := { Cx | Cx isin C }
13 patch P is two sets Px of commits, Ptip and Pbase
14 each subset has a single ur-ancestor C0_Ptip resp C0_Pbase
15 all these subsets Ptip,Qbase,Rtip,Sbase mutually exclusive
16 P(C) is either Ptip, Pbase, or nil (recorded in commit)
18 commits fall into three categories wrt P
19 inpatch(P,C) = included
21 \forall D \elem Ptip, C has D <=> C > D
24 \forall D \elem Ptip, !(C has D)
25 inpatch(P,C) = removed
27 cont(C) \intersection Ptip = { }
28 but maybe \exists Cx \elem Ptip s.t. Cx < C
30 the ends E(C,Px) of Px = Pbase or Ptip are
31 every maximal Ce < C in Px
33 C > Ce and !\exists C s.t. C > Ce
35 existence of corresponding base B for every tip commit C
36 \forall C s.t. P(C) = Ptip
37 \exists B s.t. E(C,Pbase) = { B }
38 resulting function B(C)
40 contents of tip commits
41 \forall C s.t. P(c) = Ptip
42 cont(C) = cont(B(C)) \union { Cp s.t. P(Cp) = Ptip and Cp < C }
45 \forall B s.t. P(c) = Pbase
46 cont(B) \notintersect Ptip
53 Cx isin C <=> Cx = D v Cx isin D
54 inpatch(P,C) = inpatch(P,D)
56 anticommit for removing a patch P from D to make C
61 inpatch(P,C) = included
71 inpatch(P,C) = removed
73 single patch dependency application
78 inpatch(P,C) != included
84 C >1 { D, A+ } => C > D, C > A+ > A-
86 inpatch(P,C) = included
96 if Cx isin L = Cx isin R,
99 Cx isin C = ! Cx isin M
101 cases of inpatch(P,L) and ,R