3 ms·
> If I were building a replacement for git... The biggest problem with git is anything that isn't just text (e.g. binary files). What's needed is a source cont
by riskable 3y ago
> If I were building a replacement for git...
The biggest problem with git is anything that isn't just text (e.g. binary files). What's needed is a source control system that understands binary file formats well enough that it is capable of producing a user (developer) friendly diff.
For example, if git understood PNG you could do a diff on two versions of that PNG and it would show you that e.g. a color was changed or a TM symbol was added or similar.
I think git will be with us for a long time but whatever replaces it will be able to handle binary diffs in an intelligent way. Probably with AI-generated summaries.
Even then it might still be git... Just an improved version.
- andrewla 3y agoAgreed -- the problem with binary files is twofold; one is a storage issue and the other is a presentation issue. Both are solvable without having to violate git's fundamental data structures. If a png is stored in a repository and changed, then logically the repository contains two snapshots identified by hash. When a user tool (or git itself) wants to display the diff, it can be as creative as it wants in figuring out how to render that diff, including understanding file formats. When git itself wants to store the two images, it has to do so with bitwise fidelity. Nonetheless, as with text files, it is totally possible for it to represent it internally as a delta-compressed view of the file, which, for an image file format, might be more compactly represented than by looking at the binary difference between the files. So long as this can be done deterministically and reproducibly, this is something that can make storage of large files more compact over time.