On Sat, Feb 19, 2022 at 11:42:33AM -0800, git noob wrote:

> > https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
> > https://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols
> >
> > Is there a way to use plumbing commands (internal transfer protocols?) to 
> > implement your own Git protocol over WebRTC? If you could somehow generate 
> > all the files necessary to update your Git repository ('git pull') and 
> > instead of sending them over a standard protocol, you would use WebRTC data 
> > channels to send that data instead. And on the receiving end, use the 
> > received files to update your repo.
> >
> > Or maybe there already exists a Git-over-WebRTC library?

I do not know of any.
I also honestly doubt about the suitability of WebRTC for the intended task.
I mean, not that it will not be able to carry out that task; just I cannot see
how it will be better at it than what's already there.

> I did find this link about remote helpers and 'git fetch'. Is this what I 
> should be investigating?:
> 
> https://stackoverflow.com/questions/17876132/can-i-create-a-custom-protocol-for-git

You're about to implement something in Git.
Why, then, are you reading the 'net and StackOverflow instead of the Git's
source code, which is freely available?

I mean, you would not avoid dealing with it anyway - basically because a
data transport is never a simple plug-and-play thing: at least the part of the
code which deals with URLs of remote repositories must be able to tell which
transport to use from a given URL.

As to implementing a custom transport, it worth building a correct mental
model of how Git data exchange happens. You should probably start with reading
manual pages on `git send-pack` and `git receive-pack` programs, and in
general start with reading the root Git manual page (run `git help git`) and
especially its section titled "Syncing repositories" which refers to the
plumbing commands which carry out different ways to exchange data in Git.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/20220221104638.nz3yb45vf7ox4pcw%40carbon.

Reply via email to