From: Luke Kenneth Casson Leighton Date: Mon, 06 Sep 2010 22:33:57 GMT Subject: Re: git pack/unpack over bittorrent - works! Message-ID: In-Reply-To: nicolas, thank you very brief reply (busy for 2 days) On Mon, Sep 6, 2010 at 5:51 PM, Nicolas Pitre wrote: >> * 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 --not sadly that involves telling the sender what the recipient has. >>  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.