chiark / gitweb /
wip traversal
[topbloke-formulae.git] / pseudomerge.tex
1 \section{Pseudo-merge}
2
3 Given $L$ and some other commits $\set R$, generate a
4 `fake merge': i.e., a commit which is a descendant of $L$ and $\set R$
5 but whose contents are exactly those of $L$.
6
7 \gathbegin
8  C \hasparents \{ L \} \cup \set R
9 \gathnext
10  \patchof{C} = \patchof{L}
11 \gathnext
12  D \isin C \equiv D \isin L \lor D = C
13 \end{gather}
14
15 \subsection{Conditions}
16
17 \[ \eqn{ Base Only }{
18  \patchof{L} \neq \py
19 }\]
20
21 \[ \eqn{ Unique Tips }{
22  C \haspatch \p \implies
23   \bigexists_T
24     \pendsof{C}{\py} = \{ T \}
25 }\]
26
27 \[ \eqn{ Foreign Unaffected }{
28  \pendsof{C}{\foreign} = \pendsof{L}{\foreign}
29 }\]
30
31 \subsection{Lemma: Foreign Identical}
32
33 $\isforeign{D} \implies \big[ D \le C \equiv D \le L \big]$.
34
35 \proof{
36 Trivial by Foreign Unaffected and the definition of $\pends$
37 }
38
39 \subsection{No Replay}
40
41 Ingredients Prevent Replay applies:
42 $A = L$ always satisfies the $\exists$.  $\qed$
43
44 \subsection{Unique Base}
45
46 Not applicable, by Base Only.
47
48 \subsection{Tip Contents}
49
50 Not applicable, by Base Only.
51
52 \subsection{Base Acyclic}
53
54 Relevant only if $L \in \pn$.  For $D = C$, $D \in \pn$; OK.
55 For $D \neq C$, OK by Base Acyclic for $L$. $\qed$
56
57 \subsection{Coherence and Patch Inclusion}
58
59 $$
60 \begin{cases}
61   L \haspatch    \p : & C \haspatch    \p \\
62   L \nothaspatch \p : & C \nothaspatch \p
63 \end{cases}
64 $$
65
66 \proof{
67 Consider some $D \in \py$.  $D \neq C$ by Base Only.
68 So $C \has \p \equiv L \has \p$.
69 }
70
71 \subsection{Unique Tips}
72
73 Explicitly dealt with by our Unique Tips condition.
74
75 \subsection{Foreign Inclusion}
76
77 True by Foreign Identical, and Foreign Inclusion of $L$.
78
79 \subsection{Foreign Contents}
80
81 Not applicable.