5 ms·
Since you can go from diffs to snapshots, and snapshots to diffs, aren't they basically equivalent? I'm struggling to see the important consequences at the user
by caterama 6y ago
Since you can go from diffs to snapshots, and snapshots to diffs, aren't they basically equivalent? I'm struggling to see the important consequences at the user level.
- viraptor 6y agoYou can't go from diffs to snapshots. Two identical diffs can be applied on different branches - looking just at the diffs, you don't know which branch it is.
- jasonwatkinspdx 6y agoThere's an asymmetry that shows up once you start doing things that rewrite the history/order. A snapshot style commit, like git uses, always denotes a complete state. Git creates the diff it needs on demand in relation to this, and any new commit created by cherry picking, rebasing, etc, is given a new identity specific to it's content. On the other hand, in a diff based system, the meaning of a diff changes based on its neighbors. This is because a line based diff is a flawed way of representing the logical operations we're doing. This is why git style systems tend to see less conflicts than diff based systems. I was a darcs user for personal stuff before git appeared, and ultimately in comparing the two I've come to see git as the right model due to this asymmetry. If we had editors that exposed logical/semantic operations, then the Theory of Patches approach would be extremely impressive. But that also would rewire our version control system to be language aware, so probably a non starter as a generic tool for developers.