From: Luke Kenneth Casson Leighton <luke.leighton@gmail.com>
To: git@vger.kernel.org
Subject: git peer-to-peer project: info needed
Date: Sun, 29 Aug 2010 22:56:27 +0100 [thread overview]
Message-ID: <AANLkTi=xLJ4w1D4=p40f8nUQfLu5hpEfNORnjroffM1v@mail.gmail.com> (raw)
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.
next reply other threads:[~2010-08-29 21:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-29 21:56 Luke Kenneth Casson Leighton [this message]
2010-08-29 22:06 ` git peer-to-peer project: info needed 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=xLJ4w1D4=p40f8nUQfLu5hpEfNORnjroffM1v@mail.gmail.com' \
--to=luke.leighton@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).