4 ms·
If disk space is no issue, a good difference format is just the entire original file and the entire new file. If an editor was involved and you want better mer
by bravesoul2 1y ago
If disk space is no issue, a good difference format is just the entire original file and the entire new file.
If an editor was involved and you want better mergability you could include the original file and the sequence of CRDT ops.
- SuperNinKenDo 1y agoIsn't that technically not the case if you wanted to apply a specific patch without every other change that's been made to the same file. The more changes, the more likely it is for a patch to fail, but in principle it seems like cherry-picking and applying a change is a valid use of a diff.
- account42 1y agoGit already conceptually stores an entire tree of files for each commit and has no problem with rebasing, cherry-picking etc. And the patches it generates for you are derived on the fly from those snapshots - a commit doesn't have a fixed canonical patch text.
- SuperNinKenDo 1y agoBut this is a proposal for a diff format, not a specification for a VCS.
- aidenn0 1y agoThe original file plus the file with the changes you care about is a superset of the information included in a diff file.