* Would this tool be useful - encoding repository data into single URL
@ 2017-05-09 12:48 Sebastian Gniazdowski
2017-05-09 13:40 ` Ævar Arnfjörð Bjarmason
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Gniazdowski @ 2017-05-09 12:48 UTC (permalink / raw)
To: git
Hello
I wonder about usability of following tool. Quick-start:
giturl https://github.com/zdharma/giturl -r devel -p lib/coding_functions.cpp
Protocol: https
Site: github.com
Repo: zdharma/giturl
Revision: devel
File: lib/coding_functions.cpp
gitu://ŬṽǚǫoŒẗ6ẏȅcЭÑẩőn4ầŘїệαЃȣϟṈӛŀї
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.
Decoding:
giturl -qd ŬṽǚǫoŒẗ6ẏȅcЭÑẩőn4ầŘїệαЃȣϟṈӛŀї
https://github.com/zdharma/giturl / rev:devel / file:lib/coding_functions.cpp
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.
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?
There are 2 implementations, in Zsh (uses Zshell like e.g. Ruby, not interactively) and C++11 (mostly because of std::regex):
https://github.com/zdharma/giturl
https://github.com/zdharma/cgiturl
--
Sebastian Gniazdowski
psprint /at/ zdharma.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Would this tool be useful - encoding repository data into single URL
2017-05-09 12:48 Would this tool be useful - encoding repository data into single URL Sebastian Gniazdowski
@ 2017-05-09 13:40 ` Ævar Arnfjörð Bjarmason
0 siblings, 0 replies; 2+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2017-05-09 13:40 UTC (permalink / raw)
To: Sebastian Gniazdowski; +Cc: Git Mailing List
On Tue, May 9, 2017 at 2:48 PM, Sebastian Gniazdowski
<psprint@zdharma.org> wrote:
> Hello
> I wonder about usability of following tool. Quick-start:
>
> giturl https://github.com/zdharma/giturl -r devel -p lib/coding_functions.cpp
>
> Protocol: https
> Site: github.com
> Repo: zdharma/giturl
> Revision: devel
> File: lib/coding_functions.cpp
>
> gitu://ŬṽǚǫoŒẗ6ẏȅcЭÑẩőn4ầŘїệαЃȣϟṈӛŀї
>
> 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.
>
> Decoding:
>
> giturl -qd ŬṽǚǫoŒẗ6ẏȅcЭÑẩőn4ầŘїệαЃȣϟṈӛŀї
> https://github.com/zdharma/giturl / rev:devel / file:lib/coding_functions.cpp
>
> 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.
>
> 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?
>
> There are 2 implementations, in Zsh (uses Zshell like e.g. Ruby, not interactively) and C++11 (mostly because of std::regex):
>
> https://github.com/zdharma/giturl
> https://github.com/zdharma/cgiturl
This looks really cool. Yeah patches can be sent this way, see
Documentation/SubmittingPatches in the git.git repository, online
version: https://github.com/git/git/blob/master/Documentation/SubmittingPatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-09 13:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-09 12:48 Would this tool be useful - encoding repository data into single URL Sebastian Gniazdowski
2017-05-09 13:40 ` Ævar Arnfjörð Bjarmason
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).