Does Swarm use Git for updating documents, like IPFS does, or does it use something else? I couldn't figure this out from reading any of the documentation?
2 Answers
Swarm doesn't update documents. An upload produces a specific hash, which is the address of the content.
When you upload a new version, you get a different hash, which becomes the new address of your latest version. This means you get versioning for free.
If you upload a directory, you can change the contents of the directory by issuing a POST to the hash of the upload. This also produces a new hash, which corresponds to the latest version of your directory - again keeping the old version with the old hash.
-
1That actually sounds kind of similar to IPFS's Git-based versioning. Commented Oct 12, 2017 at 21:34
-
(I don't know the answer to your actual question, but the below may be of some use.)
A while back there was a project called Mango that (claimed it) provided the abstraction layer for plugging Git into any of the P2P content-addressable networks, including Swarm. So slightly different, in that we're not talking about incorporating Git directly.
I'm unsure of the current state of the project. More here.