Hash addressed content #3
Labels
No labels
Bikeshedding
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: jcgruenhage/git-on-matrix#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
To easily get git objects out of the media repository we either need a mapping of SHA1 to mxc://url or a way to get the object only using it's hash.
Instead of
GET /_matrix/media/r0/download/{serverName}/{mediaId}
we could do something likeGET /_matrix/media/r0/download/{multihash}/{roomId}/{primaryServer}
, where the last part would be optional.The multihash thing would be https://github.com/multiformats/multihash
An alternative (that I like a lot less, but that might make Maximus happier) would be to not store the git objects as is, but instead put an mxc url right behind the SHA1's. That way, we neither need hash addressed content, nor some place to store the mapping, at least on the server side. The disadvantage is that if we mess up the objects slightly when reconstructing them, the hashes will not match and git will be very unhappy.
That also means that we can now encrypt the blobs, because we don't rely on the hashes to match up. People can't use a commit hash (sometimes included in version codes) to pull the complete source either anymore.
Not coming any time soon because hash addressed content might block future streaming usecases, where the file does not fully exist yet (so is not hash-able) when the download begins.