git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git peer-to-peer project: info needed
@ 2010-08-29 21:56 Luke Kenneth Casson Leighton
  2010-08-29 22:06 ` Jonathan Nieder
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Luke Kenneth Casson Leighton @ 2010-08-29 21:56 UTC (permalink / raw)
  To: git

hi folks,

[please could you kindly cc on responses because i am subscribed with
"no mail" set]

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.  i'm presently looking at the use of
walker_fetch in builtin-http-fetch.c which gives me some idea.
however as i aim to implement this first in python not c, i need to be
using git via command-line only.

perhaps... does anyone know of an implementation of "git fetch" in
say... shell-script (or perhaps in python) or just absolutely any
language _other_ than c?

i believe... i believe i may need the git rev-list and git
pack-objects commands, would that be right?  rev-list gives the list
of commit revisions; pack-objects, if i can merely transfer the .pack
file and .index file over the peer-to-peer network, the job's half
done, am i right?

(the only missing step is to have a way to find the list of objects at
the remote end - i know how to do that)

following that, i can do "git unpack-objects" on the .pack file(s)

and... i've just done a test on that (manually, by running
git-pack-objects --thin --all --stdout and then git-unpack-objects)
... um.... :)  i'm missing the "tag updating", aren't i?  the objects
are now in the .git repo but they're "hanging about", as can be seen
with git fsck:

$  git fsck
dangling commit af87b49b9fbcae28ae19b86ca04af5bd4a9f6778

so... my next step iis... ermm... update the head ref?  err? :)  i see
that gitpython is simply writing [the above ref] into
.git/ref/heads/master or whereever is specified (must begin with refs)
which is kinda cheating but perfectly reasonable... err.. but wait...
i'm into what "git-pull.sh" is doing at this point, aren't i?

soo... i kinda don't have to worry about that bit, am i right?  as
long as i get to complete the "git-unpack-objects" stage, the rest can
be handled by git-pull.sh, am i right?

much obliged some answers so that i can get this done, as free
software, and provide people with a peer-to-peer distributed version
of git.

l.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-08-30 21:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-29 21:56 git peer-to-peer project: info needed Luke Kenneth Casson Leighton
2010-08-29 22:06 ` Jonathan Nieder
2010-08-29 22:57   ` Luke Kenneth Casson Leighton
2010-08-30  6:56 ` Matthieu Moy
2010-08-30 11:31   ` Luke Kenneth Casson Leighton
2010-08-30 17:39 ` Casey Dahlin
2010-08-30 17:45   ` Casey Dahlin
2010-08-30 21:22     ` Luke Kenneth Casson Leighton

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 NNTP newsgroup(s).