I found this [0] to be a very readable presentation of the theory behind Pijul. Key point is that by representing state as an "DAG of lines" instead of as an "ordered list of lines" (i.e. a file), you are always able to do perfect merges.
You then need a "flattening" step to get to a normal file, but that is handled same as any other patch.
All in all, I am a tempted to give this a try -- even though the mental model will require some mental rewiring.