Re: git pack/unpack over bittorrent - works!
nicolas, thank you very brief reply (busy for 2 days)
On Mon, Sep 6, 2010 at 5:51 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
Show 5 quoted lines
>> * to work out how far local deviates from remote along that list of commits
>
> That's an operation that only the peer with the most recent commits can
> do, unless you transfer that huge list of commits from above across the
> network.
i Have A Plan for dealing with that.
> So, on a server (i.e. the peer sending objects) you'd do:
>
> git rev-list <refs_that_I_publish> --not <refs_that_the_remote_has>
sadly that involves telling the sender what the recipient has.
Show 7 quoted lines
>> problem: despite looking through virtually every single builtin/*.c
>> file which uses write_sha1_file (which i believe i have correctly
>> identified, from examining git unpack-objects, as being the function
>> which stores actual objects, including their type), i do not see a git
>> command (yet) which performs the reverse operation of "git cat-file".
>
> It is 'git hash-object'.
ah _haa_ - thank you! ok, so i have to create a pack-object-like
format, putting the object type at the beginning of the format, then
put the contents of "git cat-file" after it.
so - apologies, will be dealing with some work-related stuff for a
day or so. thank you for everything so far nicolas.
l.