4 ms·
I've been waiting for this. Ever since: 1. I learned from Linus that git is a decentralized "content" database that gives identity to different versions of the
by davidmathers 18y ago
I've been waiting for this. Ever since:
1. I learned from Linus that git is a decentralized "content" database that gives identity to different versions of the same content and allows them to be compared and merged. (as opposed to a traditional VCS which is more of a "delta" database)
2. I learned from Damien that CouchDB is a decentralized "document" database that gives identity to different versions of the same document and allows them to be compared and merged.
I've been wondering just what the difference really is.
- ivanstojic 18y agoWell, it's simple: different command line switches :-)
- iamwil 18y agoGit retains its change history, and if I remember correctly, uses the sha hash to verify that no one changed the history. Couchdb retains the change history until someone compresses the db (garbage collect). Its revision history is only used as a means of merging out of sync documents. In addition, Git makes individual merges in a document, and when there's a conflict, it resorts to human intervention. Couchdb does not make merges inside a document, and will not do conflict resolution. Instead, using a brief set of rules, it picks one version of the document over another.
- peregrine 18y agoThanks for that, but couldn't you theoretically very easily script git to automatically choose based on prior requirements?
- ivanstojic 18y agoOf course you could. I guess one of the more important points that are made somewhat subtly by this hack is that you can easily fiddle with the functionality of a simple yet flexible piece of software (git) - that's what the Unix philosophy preaches. You start by taking lots of simple components, that are flexible and do not make assumptions about their use, glue them up together into bigger pieces. Large homogeneous systems that only provide one functionality are hard if not impossible to extend to make them do just what you want. Unless you want what they do in the first place, which makes the whole customization thing pointless ;-) But that is self evident, or at least should be.
- mcav 18y agoIs there a way to make Git choose one over the other rather than merging? --mine or --yours or something?
- ivanstojic 18y agoThere's a git merge strategy called "ours" which - as you might guess - does a quasimerge which always results in whatever you have in your HEAD.