git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git peer-to-peer project: info needed

From
LLLuke Kenneth Casson Leighton <luke.leighton@gmail.com>
Date
Aug 29, 2010, 22:57 UTC
Message-ID
<AANLkTi=vcXX8n3NzGF51c=wPhgqushpwM4R7hR=O6QuU@mail.gmail.com>
In-Reply-To
<20100829220654.GH1890@burratino>
On Sun, Aug 29, 2010 at 11:06 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 11 quoted lines
> Hi Luke,
>
> Luke Kenneth Casson Leighton wrote:
>
>> i need some guidance on what i should be doing, to add peer-to-peer
>> networking to "git fetch".  i can take care of the peer-to-peer
>> networking side: the bit i'm unsure about is what sequence of events
>> are required to happen.
>
> Not sure if this is the best answer or not, but you might enjoy
> looking at the git-remote-helpers(7) feature
       git-remote-helpers - Helper programs to interact with remote
       repositories
okaay, i see where you're going with that one.  thanks.
> and git-remote-testgit.py
> example.
 have to find that.
> Also, in case it is useful: the old scripted "git fetch" is available
> as contrib/examples/git-fetch.sh.
 ahh.  ah _ha_.  yes.  excellent.
 btw, gitpython interestingly has a 4-line method for working out the
list of commits required to be obtained in order for the local copy to
catch up:
        repo_refs = self.git.rev_list(ref, '--').strip().splitlines()
        other_repo_refs = other_repo.git.rev_list(other_ref,
'--').strip().splitlines()
        diff_refs = list(set(other_repo_refs) - set(repo_refs))
        return map(lambda ref: Commit.find_all(other_repo, ref,
max_count=1)[0], diff_refs)

it's going to be a leeetle more tricky than that, over a p2p network, unless i cheat, and place the other_repo's rev-list into a meta-file which is also distributed over the p2p network.... yuk to that, on the basis that long-living repos that's going to be a biiig file (would that actually be the case? what's the largest "git rev-list --all" that anyone's ever seen? yikes - on git itself it's 860k!) hmmm.. git rev {commit1}...{commit2} might give me what i need (and be equivalent to the above 4 python lines but it can be done by the remote end - that's still potentially a damn big amount of info. well, i'm sure i'll cope :)

i just want to get something working, damnit. there simply aren't enough free software client-server-paradigm-independent development tools around, and that's a situation that's causing me some concern.

l.
Previous: Jonathan NiederNext: Matthieu Moy
Message 3 of 8 in “git peer-to-peer project: info needed”
  1. Luke Kenneth Casson LeightonAug 29, 2010
  2. Jonathan NiederAug 29, 2010
  3. Luke Kenneth Casson LeightonAug 29, 2010
  4. Matthieu MoyAug 30, 2010
  5. Luke Kenneth Casson LeightonAug 30, 2010
  6. Casey DahlinAug 30, 2010
  7. Casey DahlinAug 30, 2010
  8. Luke Kenneth Casson LeightonAug 30, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.