%dD3/asLjd5HH+t601ifN5mZ0xnpHRUMH+axfNISliNU=.sha256
{ "previous": "%LfixR2Ji55lDbjYMfPOhAhIumH5GL12Sudfhoheno0Q=.sha256", "author": "@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519", "sequence": 583, "timestamp": 1456200736125, "hash": "sha256", "content": { "type": "post", "text": "@dominic: in the current schema, there are two message types:\n\n`{ type: 'git-repo' }`\nCreates a repo.\n\n```\n{\n type: 'git-update',\n repo: MsgId,\n refs: { <ref>: String|null },\n objects: { <sha1>: { type: String, length: Number, key: BlobId } },\n objects_ext: BlobId\n}\n```\nUpdates a repo. Published as a result of `git push`.\n- `repo`: id of a message of type `git-repo` identifying the repo\n- `refs`: updates to the repo's refs. a map of ref names to git sha1 hashes. e.g. `{ 'refs/heads/master': commitId }`\n- `objects`: git objects being added to the repo. maps git sha1 hashes to object info.\n - `object.type`: one of `[\"commit\", \"tree\", \"blob\", \"tag\"]`\n - `object.length`: size in bytes of the git object\n - `object.key`: id of ssb id containing the git object's data.\n- `objects_ext`: link to a blob containing a JSON object of the same schema as `objects`. Used to supplement `objects` when the `git-update` message can't fit all the objects within in the size limit.\n\nWould this schema need to be changed in order to get blobs synced automatically? (other than the ones linked to in the `objects_ext` blob)\n\n> I'm guessing that you must point to all the new objects from the post, because we can't change the sha1 links in the git commit and tree objects without breaking it all.\n\nI did actually get it working (in the tests, at least) to rewrite the sha1 links in the git objects in a reversible way [[1]](https://github.com/clehner/git-rehash/) so they could refer to each other using sha256 hashes. Then the update message wouldn't have to include the list of objects. However, the problem is that in the git protocol for `git fetch`, there is a phase where the client sends to the server ids of objects that it has, and the server (the git remote helper) is supposed to check if it has those objects. So the remote helper has to be able to quickly look up git sha1 hashes. Perhaps this could be made efficient using StreamView. Also, the web UI should probably be able to look up a git hash if the user wants to be able to paste in a commit hash and view it.\n", "root": "%01yDHkjFszQ2xEglLGuTqbZOjg78CMaRl7q4rlYGPaM=.sha256", "branch": "%CZBGPItt423UuIt32EEdwD/D6ltLf4Ty9XcYv2ptS2Q=.sha256", "mentions": [ { "link": "@EMovhfIrFk4NihAKnRNhrfRaqIhBv1Wj8pTxJNgvCCY=.ed25519", "name": "dominic" } ] }, "signature": "nrDJWBrFCifVw3y8gM3FE9JouCB/kRS2U10kFdil6izOZV+d0Np352N4fZomzYaAMmksESXeTchzknqAaIdDDQ==.sig.ed25519" }
Built with git-ssb-web