chiark / gitweb /
strategy: wip reachable etc.
[topbloke-formulae.git] / strategy.tex
index 1e8ee0156f5846bec3d54e4852396c703c432564..253ffc31fb1340fbd8dff16516d6caa0f8b33262 100644 (file)
@@ -74,7 +74,7 @@ All the input commits to the update algorithm.  (See below.)
 The topmost patch which we are trying to update.  This and
 all of its dependencies will be updated.
 
-\item[ $h : \pc^{+/-} \mapsto \set H_{\pc^{+/-}}$ ]
+\item[ $h : \pc^{+/-} \mapsto \set H^{\pc^{+/-}}$ ]
 Function for getting the existing heads $\set H$ of the branch $\pc^{+/-}$.
 These are the heads which will be merged and used in this update.
 This will include the current local and remote git refs, as desired.
@@ -104,8 +104,37 @@ during the update algorithm).
 
 \item[ $\tipcn, \tipcy$ ]
 The new tips of the git branches $\pcn$ and $\pcy$, containing
-all the correct commits (and the correct other patches), as
-generated by the Traversal phase of the update algorithm.
+all the appropriate commits (and the appropriate other patches),
+as generated by the Traversal phase of the update algorithm.
+
+\item[ $\allreach$ ]
+The set of all reachable commits.
+
+A reachable commit is one we might refer to explicitly in any of these
+algorithms, and any ancestor of such a commit.  We explicitly
+enumerate all of the input commits ($\allsrcs$), so the reachable
+commits are originally the input commits and their ancestors.
+
+$\allreach$ varies over time as we generate more commits.  Each
+commit we generate will have only reachable commits as ancestors, so
+generating a new commit (only) adds that new commit to $\allreach$.
+
+\item[ $\allreachof{\py}$ ]
+The set of reachable commits at the point where we have just generated
+$\tippy$, i.e. just after $\alg{Merge-Tip}(\p)$.
 
 \end{basedescript}
 
+\stdsection{ WIP tip satisfaction, reachable commits }
+
+We preserve/ensure
+$$ \tippy >= \pendsof{\allreach_{\py}}{\py} $$
+($\tippy$ is computed during traversal for the patch $\p$)
+
+We ensure this property by:
+  - we do not generate any commits for py other than
+    during Merge-Tip
+  - so at the start of Merge-Tip pendsof (O, py) = pendsof (U, py)
+  - Merge-Tip itself wip wip wip
+
+