tef on Nostr: imagine for a moment that you're reimplementing git or hg, and you're looking at how ...
imagine for a moment that you're reimplementing git or hg, and you're looking at how to store a snapshot of a directory, recursively
git has a merkle tree like deal, and iirc hg just uses a big list of names and shas, but i'm wondering if there's any other designs worth considering
in particular, neither handles "a really big directory filled with files" that well, although it's easy to fix: you can just split up the file or tree by prefix
Published at
2025-10-02 17:33:52 UTCEvent JSON
{
"id": "2c8ea3d17f70892c7d4cf14f4108cbcb7820190a762ac14c23d92786c4c9dcd2",
"pubkey": "9ae77219c584658e1c0dc82a42ab845a15a1b43449beae509b3267889c20f8ea",
"created_at": 1759426432,
"kind": 1,
"tags": [
[
"content-warning",
"git, content addressable structures"
],
[
"proxy",
"https://mastodon.social/users/tef/statuses/115305770674695319",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.mostr.pub"
]
],
"content": "imagine for a moment that you're reimplementing git or hg, and you're looking at how to store a snapshot of a directory, recursively\n\ngit has a merkle tree like deal, and iirc hg just uses a big list of names and shas, but i'm wondering if there's any other designs worth considering \n\nin particular, neither handles \"a really big directory filled with files\" that well, although it's easy to fix: you can just split up the file or tree by prefix",
"sig": "92577f5e6fe86146a765451b9dd34ae805aeceedbefd1ffdbf866e5110f4032b649aa3723c1cf3e6b93dac12f55d91d63ad788eaa71c8c9d231beebc4dc34d68"
}