{"thread":{"id":"45908","subject":"Would this tool be useful - encoding repository data into single URL","startedAt":"2017-05-09T12:55:03Z","lastAt":"2017-05-09T13:40:49Z","messageCount":2,"participants":["Sebastian Gniazdowski","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"319193","messageId":"etPan.5911baaf.74b0dc51.6b4c@MacMini","threadId":"45908","inReplyTo":null,"subject":"Would this tool be useful - encoding repository data into single URL","fromName":"Sebastian Gniazdowski","fromEmail":"psprint@zdharma.org","sentAt":"2017-05-09T12:48:47Z","receivedAt":"2017-05-09T12:55:03Z","isPatch":false,"sender":{"key":"psprint@zdharma.org","avatar":null},"body":"Hello\nI wonder about usability of following tool. Quick-start:\n\n    giturl https://github.com/zdharma/giturl -r devel -p lib/coding_functions.cpp\n\n    Protocol: https\n    Site:     github.com\n    Repo:     zdharma/giturl\n    Revision: devel\n    File:     lib/coding_functions.cpp\n\n    gitu://ŬṽǚǫoŒẗ6ẏȅcЭÑẩőn4ầŘїệαЃȣϟṈӛŀї\n\nIt does Huffman encoding and base-1024 encoding to pack given data into single URL. The Unicode characters selected for base-1024 encoding are letters, not symbols, so double-clicking in e.g. web browser selects the whole code, making it easy to grab a repository data.\n\nDecoding:\n\n    giturl -qd ŬṽǚǫoŒẗ6ẏȅcЭÑẩőn4ầŘїệαЃȣϟṈӛŀї\n    https://github.com/zdharma/giturl / rev:devel / file:lib/coding_functions.cpp\n\nI can also encode commits relative to given revision, e.g. bits 10011 are commits 1, 4, 5. Easy to add to the g-code. Selecting 10th commit is only 1 character in base-1024.\n\nHowever I wonder if this has any uses. Could be patches sent this way? Having refs/patches/<name>, encoding <name> in URL, sending it instead of inlining/attaching a diff, selecting e.g. 3 commits via the bit-mask mentioned. That said, it's more about easy-grab of repository data and storage in well-defined, consistent format, not in language \"the branch is ..., commit a7a35cb\". Does this make sense?\n\nThere are 2 implementations, in Zsh (uses Zshell like e.g. Ruby, not interactively) and C++11 (mostly because of std::regex):\n\nhttps://github.com/zdharma/giturl\nhttps://github.com/zdharma/cgiturl\n\n--\nSebastian Gniazdowski\npsprint /at/ zdharma.org\n"},{"id":"319198","messageId":"CACBZZX4p=h7G2F+khZL6X2LSccPBpa__Op+ouO4mPAY9=2r7rQ@mail.gmail.com","threadId":"45908","inReplyTo":"etPan.5911baaf.74b0dc51.6b4c@MacMini","subject":"Re: Would this tool be useful - encoding repository data into single URL","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-05-09T13:40:22Z","receivedAt":"2017-05-09T13:40:49Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, May 9, 2017 at 2:48 PM, Sebastian Gniazdowski\n<psprint@zdharma.org> wrote:\n> Hello\n> I wonder about usability of following tool. Quick-start:\n>\n>     giturl https://github.com/zdharma/giturl -r devel -p lib/coding_functions.cpp\n>\n>     Protocol: https\n>     Site:     github.com\n>     Repo:     zdharma/giturl\n>     Revision: devel\n>     File:     lib/coding_functions.cpp\n>\n>     gitu://ŬṽǚǫoŒẗ6ẏȅcЭÑẩőn4ầŘїệαЃȣϟṈӛŀї\n>\n> It does Huffman encoding and base-1024 encoding to pack given data into single URL. The Unicode characters selected for base-1024 encoding are letters, not symbols, so double-clicking in e.g. web browser selects the whole code, making it easy to grab a repository data.\n>\n> Decoding:\n>\n>     giturl -qd ŬṽǚǫoŒẗ6ẏȅcЭÑẩőn4ầŘїệαЃȣϟṈӛŀї\n>     https://github.com/zdharma/giturl / rev:devel / file:lib/coding_functions.cpp\n>\n> I can also encode commits relative to given revision, e.g. bits 10011 are commits 1, 4, 5. Easy to add to the g-code. Selecting 10th commit is only 1 character in base-1024.\n>\n> However I wonder if this has any uses. Could be patches sent this way? Having refs/patches/<name>, encoding <name> in URL, sending it instead of inlining/attaching a diff, selecting e.g. 3 commits via the bit-mask mentioned. That said, it's more about easy-grab of repository data and storage in well-defined, consistent format, not in language \"the branch is ..., commit a7a35cb\". Does this make sense?\n>\n> There are 2 implementations, in Zsh (uses Zshell like e.g. Ruby, not interactively) and C++11 (mostly because of std::regex):\n>\n> https://github.com/zdharma/giturl\n> https://github.com/zdharma/cgiturl\n\nThis looks really cool. Yeah patches can be sent this way, see\nDocumentation/SubmittingPatches in the git.git repository, online\nversion: https://github.com/git/git/blob/master/Documentation/SubmittingPatches\n"}]}