Skip to content

Commit 193d9ad

Browse files
committed
documentation: further refinements.
1 parent 159fc66 commit 193d9ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -152,23 +152,23 @@ <h2>Solution outline</h2>
152152
Note: although it might be tempting to do so, squashing e(^N)' with N''' and P''' with e(Q^)' is almost certainly a mistake since although
153153
the squashed commit P'''+e(Q^)' will contain a consistent tree (because e(Q^)') does, e(^N)'+N''' will be inconsistent but not obviously so.
154154
</p>
155-
<p>Interestingly if we call name the diff between P''' and e(Q^)' as Z and its reverse ~Z:
155+
<p>Suppose we name the diff between P''' and e(Q^)' as Z and its reverse ~Z
156156
<pre>
157157
^e(^N)'-N'''-P'''-e(Q^)'
158158
</pre>
159-
and if Z successfully applies to N''', we could rewrite the history as:
159+
and if Z successfully applies to N''', then we could rewrite the history as:
160160
<pre>
161161
^e(^N)'-N'''-apply(Z)-apply(~Z)-P'''-apply(Z)
162162
</pre>
163163
<p>
164-
Now, by definition apply(~Z)-P'''-apply(Z) is consistent (since it produces e(Q^)' and we are assuming e(Q^)' is persistent).
164+
Now, by definition apply(~Z)-P'''-apply(Z) is consistent (since it produces e(Q^)' and we are assuming e(Q^)' is consistent).
165165
</p>
166166
<p>
167167
I can't formally prove it, but presumably:
168168
<pre>
169169
^e(^N)'-N'''-apply(Z)
170170
</pre>
171-
would also produce a consistent tree.
171+
would also produce a consistent tree on the basis that a patch that successfully restores consistency later in a series might successfully do so when applied earlier.
172172
<p>
173173
If so, squashing those as N'''' might be viable way to collapse the compensations and indeed suggests that it may even be possible to automatically eliminate all compensations from the rewritten history in cases where the apply(Z) cleanly applies to all the compensated commits - simply insert pairs of apply(Z), apply(Z~) after all compensated commits and squash the first compensation with the intervening edit and the next compensation repeatedly until all such triples are replaced with new versions of the compensated edits.
174174
</p>

0 commit comments

Comments
 (0)