{"thread":{"id":"57491","subject":"URI Scheme for git object ids?","startedAt":"2022-03-01T17:36:10Z","lastAt":"2022-03-01T21:09:24Z","messageCount":7,"participants":["Ed Warnicke","Junio C Hamano","Konstantin Ryabitsev"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"449939","messageId":"CAFVSqg1arVNwWMANwR6CDP++5hXAEW1a_ajekNe+TXNpSSZFPA@mail.gmail.com","threadId":"57491","inReplyTo":null,"subject":"URI Scheme for git object ids?","fromName":"Ed Warnicke","fromEmail":"hagbard@gmail.com","sentAt":"2022-03-01T17:35:52Z","receivedAt":"2022-03-01T17:36:10Z","isPatch":false,"sender":{"key":"hagbard@gmail.com","avatar":null},"body":"Has there been any discussion of how one might represent a git object\nid as a urn or uri?\n\nIt's clear that 'git:' is registered with IANA as a URI prefix for\nlocations of git repos.\n\nI was wondering if there was any existing use of something like:\n\n'gitoid:${type}:${hash type}:${hash of git object}' ?\n\nSo for example:\n\ngitoid:blob:sha1:261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64\n\nwhich could be used to communicate generic git object ids.\n\nEd\n"},{"id":"449941","messageId":"xmqqy21tr2pg.fsf@gitster.g","threadId":"57491","inReplyTo":"CAFVSqg1arVNwWMANwR6CDP++5hXAEW1a_ajekNe+TXNpSSZFPA@mail.gmail.com","subject":"Re: URI Scheme for git object ids?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-03-01T17:40:27Z","receivedAt":"2022-03-01T17:41:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ed Warnicke <hagbard@gmail.com> writes:\n\n> Has there been any discussion of how one might represent a git object\n> id as a urn or uri?\n>\n> It's clear that 'git:' is registered with IANA as a URI prefix for\n> locations of git repos.\n>\n> I was wondering if there was any existing use of something like:\n>\n> 'gitoid:${type}:${hash type}:${hash of git object}' ?\n>\n> So for example:\n>\n> gitoid:blob:sha1:261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64\n>\n> which could be used to communicate generic git object ids.\n>\n> Ed\n\nI do not see why the object type should be there.  Once you locate\nthe object whose object name (in sha1) is 261eeb..., the object\nshould be able to identify itself as a blob (or whatever type it\nis).\n\nAren't there already folks who are exchanging git objects over\ntorrent or something?  What do they use to identify what each node\noffers and what participants want?\n\n"},{"id":"449943","messageId":"CAFVSqg2GEs7QXQvHmhxgxFAy35yN5GgDGwAZ1bPm-gfmCPzqRA@mail.gmail.com","threadId":"57491","inReplyTo":"xmqqy21tr2pg.fsf@gitster.g","subject":"Re: URI Scheme for git object ids?","fromName":"Ed Warnicke","fromEmail":"hagbard@gmail.com","sentAt":"2022-03-01T17:43:43Z","receivedAt":"2022-03-01T17:44:03Z","isPatch":false,"sender":{"key":"hagbard@gmail.com","avatar":null},"body":"Junio,\n\nThat's the kind of feedback (and pointers) I was hoping for :)\n\nSo is it fair to say you are suggesting:\n\n1. Talk to 'torrent or something' folks to see if they have a scheme in use\n\nand\n\n2.  If not, 'gitoid:${hashtype}:${hashvalue} - like:\n     gitoid:sha1:261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64\n     would be a better choice\n\nEd\n\nOn Tue, Mar 1, 2022 at 11:40 AM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Ed Warnicke <hagbard@gmail.com> writes:\n>\n> > Has there been any discussion of how one might represent a git object\n> > id as a urn or uri?\n> >\n> > It's clear that 'git:' is registered with IANA as a URI prefix for\n> > locations of git repos.\n> >\n> > I was wondering if there was any existing use of something like:\n> >\n> > 'gitoid:${type}:${hash type}:${hash of git object}' ?\n> >\n> > So for example:\n> >\n> > gitoid:blob:sha1:261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64\n> >\n> > which could be used to communicate generic git object ids.\n> >\n> > Ed\n>\n> I do not see why the object type should be there.  Once you locate\n> the object whose object name (in sha1) is 261eeb..., the object\n> should be able to identify itself as a blob (or whatever type it\n> is).\n>\n> Aren't there already folks who are exchanging git objects over\n> torrent or something?  What do they use to identify what each node\n> offers and what participants want?\n>\n"},{"id":"449945","messageId":"20220301175334.ctem25nxckynnvco@meerkat.local","threadId":"57491","inReplyTo":"CAFVSqg1arVNwWMANwR6CDP++5hXAEW1a_ajekNe+TXNpSSZFPA@mail.gmail.com","subject":"Re: URI Scheme for git object ids?","fromName":"Konstantin Ryabitsev","fromEmail":"konstantin@linuxfoundation.org","sentAt":"2022-03-01T17:53:34Z","receivedAt":"2022-03-01T17:53:39Z","isPatch":false,"sender":{"key":"konstantin@linuxfoundation.org","avatar":"https://gravatar.com/avatar/7cb8827c6de56e1bd2dea16508c6708aa43feed3bf3813bcdacecdf96ceadd79?d=mp&s=160"},"body":"On Tue, Mar 01, 2022 at 11:35:52AM -0600, Ed Warnicke wrote:\n> Has there been any discussion of how one might represent a git object\n> id as a urn or uri?\n\nThis sounds similar to what git over ipfs folks wanted to do, but they ran\ninto obvious scaling problems. It works fine for small repositories with a few\ndozen commits, but once we're talking millions, the process of doing anything\nwith such remote starts taking hours and days.\n\nIf you're interested in a decentralized forge solution, then Radicle has the\nclosest to something that is working. You just have to ignore all the crazy\ncryptoblarf web3 stuff.\n\n-K\n"},{"id":"449946","messageId":"CAFVSqg3i_ANc1sTmEHaxjxxdkkN9HbUEUwejV5S5V5tM2fhWWA@mail.gmail.com","threadId":"57491","inReplyTo":"20220301175334.ctem25nxckynnvco@meerkat.local","subject":"Re: URI Scheme for git object ids?","fromName":"Ed Warnicke","fromEmail":"hagbard@gmail.com","sentAt":"2022-03-01T17:58:01Z","receivedAt":"2022-03-01T17:58:21Z","isPatch":false,"sender":{"key":"hagbard@gmail.com","avatar":null},"body":"Konstantin,\n\nI suspect you read a bit more into my question than I intended :)  I\ndo appreciate the breadth of your thought about it though :)\n\nMostly, I'm just looking for a way to express the git object id as a\nuri scheme so completely outside-of-git things can refer to it clearly\n(ie, know to prepend the object header before hashing to see if the\ncontents match).\n\nDefinitely not thinking of any vaguely web3 ideas :)\n\nEd\n\nOn Tue, Mar 1, 2022 at 11:53 AM Konstantin Ryabitsev\n<konstantin@linuxfoundation.org> wrote:\n>\n> On Tue, Mar 01, 2022 at 11:35:52AM -0600, Ed Warnicke wrote:\n> > Has there been any discussion of how one might represent a git object\n> > id as a urn or uri?\n>\n> This sounds similar to what git over ipfs folks wanted to do, but they ran\n> into obvious scaling problems. It works fine for small repositories with a few\n> dozen commits, but once we're talking millions, the process of doing anything\n> with such remote starts taking hours and days.\n>\n> If you're interested in a decentralized forge solution, then Radicle has the\n> closest to something that is working. You just have to ignore all the crazy\n> cryptoblarf web3 stuff.\n>\n> -K\n"},{"id":"449953","messageId":"20220301183040.rvj6jb2mfc46kv6t@meerkat.local","threadId":"57491","inReplyTo":"CAFVSqg3i_ANc1sTmEHaxjxxdkkN9HbUEUwejV5S5V5tM2fhWWA@mail.gmail.com","subject":"Re: URI Scheme for git object ids?","fromName":"Konstantin Ryabitsev","fromEmail":"konstantin@linuxfoundation.org","sentAt":"2022-03-01T18:30:40Z","receivedAt":"2022-03-01T18:30:47Z","isPatch":false,"sender":{"key":"konstantin@linuxfoundation.org","avatar":"https://gravatar.com/avatar/7cb8827c6de56e1bd2dea16508c6708aa43feed3bf3813bcdacecdf96ceadd79?d=mp&s=160"},"body":"On Tue, Mar 01, 2022 at 11:58:01AM -0600, Ed Warnicke wrote:\n> Konstantin,\n> \n> I suspect you read a bit more into my question than I intended :)  I\n> do appreciate the breadth of your thought about it though :)\n\nAh. Sorry, my perception is understandably tainted in the past few days.\n\n> Mostly, I'm just looking for a way to express the git object id as a\n> uri scheme so completely outside-of-git things can refer to it clearly\n> (ie, know to prepend the object header before hashing to see if the\n> contents match).\n\nOkay, I understand -- so for purposes like adding to sigstore or other supply\nchain tracking systems?\n\n-K\n"},{"id":"450019","messageId":"CAFVSqg2zp+BeYQ_JaBXVfJ0csmNtF1N8avCZ52gq1Twtw4_zyQ@mail.gmail.com","threadId":"57491","inReplyTo":"20220301183040.rvj6jb2mfc46kv6t@meerkat.local","subject":"Re: URI Scheme for git object ids?","fromName":"Ed Warnicke","fromEmail":"hagbard@gmail.com","sentAt":"2022-03-01T21:09:08Z","receivedAt":"2022-03-01T21:09:24Z","isPatch":false,"sender":{"key":"hagbard@gmail.com","avatar":null},"body":"Exactly... anybody who wants to be able to say \"This is a git object\nid for a thing\" rather than \"this is a random sha1\" (or perhaps\nsomeday, sha256), and more importantly... if presented with say... the\nsame contents outside of a git repo repeat the computation of the git\nobject id and see that it's referring to the contents they have in\ntheir hands.\n\nThat had been my original thought around including the 'object type'\n(gitoid:blob:sha1:261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64) because if\npresented with an array of bytes outside of a git repo, if I want to\nknow whether or not it matches the git oid, I need to know what git\nobject type to put in the git header prepended to the contents.\n\nI have a tendency to generalization though, and so its'1 good to get\nfeedback from folks closer to git as to whether that makes sense or\nnot.\n\nAs a side note: in case I'm being unclear: there is no conceivable\nuniverse in which I'm advocating for git to change anything it does\naround this conversation.  I'm just seeking 'advice'.  Among the space\nof valid advice being: \"don't reinvent the wheel, these folks already\nhave a perfectly serviceable wheel\"\n\nEd\n\nOn Tue, Mar 1, 2022 at 12:30 PM Konstantin Ryabitsev\n<konstantin@linuxfoundation.org> wrote:\n>\n> On Tue, Mar 01, 2022 at 11:58:01AM -0600, Ed Warnicke wrote:\n> > Konstantin,\n> >\n> > I suspect you read a bit more into my question than I intended :)  I\n> > do appreciate the breadth of your thought about it though :)\n>\n> Ah. Sorry, my perception is understandably tainted in the past few days.\n>\n> > Mostly, I'm just looking for a way to express the git object id as a\n> > uri scheme so completely outside-of-git things can refer to it clearly\n> > (ie, know to prepend the object header before hashing to see if the\n> > contents match).\n>\n> Okay, I understand -- so for purposes like adding to sigstore or other supply\n> chain tracking systems?\n>\n> -K\n"}]}