I am new here, and stumbled on Joplin in my pursuit to replace OneNote. I like the idea of decoupling the backend service and using open standards, but I find it a pity that GIT or SVN haven't been explored any further, although according to this post it seems to have been suggested many times, even in 2020…
One thing that is keeping me from ditching OneNote is the fact that it stores an update-date for every written paragraph, not just the file. (You can see who wrote a line of text by simply right-clicking on it, which then gives you some more context about it.) This functionality would essentially be the “blame” function in SVN/GIT.
I think a version control system behind a notebook is the ideal solution and if I am to go with limitations of markdown, then at least I should properly version-control it. Before I gave up on Joplin, it occurred to me that the supported WebDAV protocol is also supported by SVN through Apache HTTP server. And since I already had everything running, I gave it a quick try, and it works perfectly. One needs to set SVNAutoversioning On so every write is considered a commit as long as DeltaV protocol extensions are not used.
And here some of my thoughts on the apparent bottlenecks in the old post.
For SVN, you can use WebDAV and extend it with specific SVN-DeltaV functions. For GIT it is a bit more complicated. If libgit2 can't be used, then plain reading over HTTP and commits through a custom-made CGI backend should suffice as a first working iteration.
The commit operation is normally independent of the number of commits in the repo. (i.e. its complexity is constant: O(1) or at most O(log(n)). So yes, there should be millions of commits.
Same as with WebDAV I use now in Joplin: I guess you store the passwords as plain files?
There should be some rules. The repo should always precede. You store the hash of the last commit. If it doesn't exist in the repo the next time you sync, then someone has tampered with it, and a full restore would be one possible solution. Another is to ask the user to resolve conflicts…
The way conflicts are handled in Joplin currently (by simply stating that the file is a conflict) is the most basic solution. This would work as well. But surely there are better tools available.