3 ms·
Implementing versioning in the file format conflicts with git, because each document is essentially its own little source control system. This can be surprising
by skybrian 3y ago
Implementing versioning in the file format conflicts with git, because each document is essentially its own little source control system. This can be surprising to users who copy the file and don’t realize that they’ve effectively copied the entire repo. Copying a file will sometimes include drafts they didn’t want to share. It can mean you lose control over when things are committed, and so you don’t end up with a useful history.
If you then check the file into git, you are storing one source control system into another one, and older versions appear in two different histories. To be git friendly, you don’t want to save anything other than the current version, and then let git do its thing.
Possibly the answer is “don’t use git, we have it covered,” but then the app developer should realize that they are implementing something like a source control system. How do people share drafts, review them, and merge changes? How do you publish a release that only includes the version you wanted to release?
And it does seem relevant that the developer of Sqlite actually did implement their own source control system [1]. Maybe they could have warned people about what they’re getting themselves into if they go down this route?
I wonder how terrible it would be to either use a git repo as your file format, or to build in git compatibility into your app somehow so you could push and pull?
[1] https://en.m.wikipedia.org/wiki/Fossil_(software) https://en.m.wikipedia.org/wiki/Fossil_(software)
- mixmastamyk 3y agoIt's pretty rare to put office docs into version control, as they are typically binary instead of text. So, doesn't work well. Perhaps there is a version of open-doc that doesn't use the zip file but a folder of XML instead? Also the XML might need to be optimized to prefer line-oriented operations.
- EricRiese 3y agoYes, in LibreOffice you can save as FODT: flat ODT, which is a single unzipped XML. That's what I use to store my resume in git.
- skybrian 3y agoYes, it's rare to use git, but it's also pretty well-known that people can share more than they intended in a Word document. Perhaps true of Open Office as well? See: https://superuser.com/questions/1562130/can-people-see-the-changes-made-in-word-document https://superuser.com/questions/1562130/can-people-see-the-c... https://foiassist.ca/2019/04/04/i-thought-we-deleted-that-metadata-and-hidden-data/ https://foiassist.ca/2019/04/04/i-thought-we-deleted-that-me...
- mixmastamyk 3y agoDon't forget Exif, its thumbnail and even reflections, in photos.