You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To me, it currently seems like the best format for a conflict is a snapshot and a series of diffs of snapshots, A B->C D->E
I slightly prefer to represent it as purely a list of diffs: 0->A B->C D->E because that seems slight simpler (we need to be able to represent absent files anyway). I have an unfinished commit on top of the commit in this PR for that, but it was too unfinished to bother sending.
I am leaning towards agreeing. The main advantage seems to be that then diffs of conflicts can be treated much like conflicts.
The reason for my hesitation and why I am less worried about it now is is as follows. I thought that you can't take diffs of diffs. However, it seems that you can. You just define (A->B) -> (C->D) = B->A C->D. This will then corresponds to how revisions would work if you identify X and 0 -> X:
X->Y = (0->X) -> (0->Y) = (X->0) (0->Y) = X -> Y
I haven't 100% convinced myself that this is a consistent view of conflicts, but I'm pretty sure it is.
The thing that bothers me more at the moment is whether 0->A B->C contains enough information; I think we may need to remember something about the relationship between A and B. Let's say A,B,C represent trees (as opposed to lines in a file), B->C modifiers a file and the file was renamed somewhere in between B and C. Do we need to leave some space in the algebra of conflicts to track such things, or do we expect a smart enough diff algorithm to figure it out based only on A, B, and C? I'm unsure.
This has to do with our recent discussions on Discord about tracking such things, Pijul, etc.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is a reply to #1480 (comment), where @martinvonz wrote a reply to me:
I am leaning towards agreeing. The main advantage seems to be that then diffs of conflicts can be treated much like conflicts.
The reason for my hesitation and why I am less worried about it now is is as follows. I thought that you can't take diffs of diffs. However, it seems that you can. You just define
(A->B) -> (C->D) = B->A C->D
. This will then corresponds to how revisions would work if you identifyX
and0 -> X
:I haven't 100% convinced myself that this is a consistent view of conflicts, but I'm pretty sure it is.
The thing that bothers me more at the moment is whether
0->A B->C
contains enough information; I think we may need to remember something about the relationship betweenA
andB
. Let's say A,B,C represent trees (as opposed to lines in a file),B->C
modifiers a file and the file was renamed somewhere in betweenB
andC
. Do we need to leave some space in the algebra of conflicts to track such things, or do we expect a smart enough diff algorithm to figure it out based only onA
,B
, andC
? I'm unsure.This has to do with our recent discussions on Discord about tracking such things, Pijul, etc.
Beta Was this translation helpful? Give feedback.
All reactions