git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Casey Dahlin <cdahlin@redhat.com>
To: Luke Kenneth Casson Leighton <luke.leighton@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: [RFC PATCH] Introduce git-hive
Date: Tue, 31 Aug 2010 13:20:09 -0400	[thread overview]
Message-ID: <20100831172008.GE16034@foucault.redhat.com> (raw)
In-Reply-To: <AANLkTikrQhzyPckN2t3+FzaJFzYboDRVfW3bPPZOGpJQ@mail.gmail.com>

On Tue, Aug 31, 2010 at 05:47:42PM +0100, Luke Kenneth Casson Leighton wrote:
> On Tue, Aug 31, 2010 at 4:52 PM, Casey Dahlin <cdahlin@redhat.com> wrote:
> > Bittorrent has the luxury of being able to proxy for the poor firewall-bound
> > users since as long as there's one peer exposed to the internet you can have
> > any two other peers connect to him and give him the data they want to exchange,
> > to the benefit of all 3. Git won't work that way because not everyone in the
> > swarm wants all chunks of data, so if you found a proxy node, you might have to
> > make him carry data (possibly lots of data) that he has no personal interest
> > in.
> 
>  ah, no you don't.
> 
>  but - think about it: even if they don't, if they don't want the set
> of commits that get you up to a particular HEAD or other tag or
> branch, what the hell are they doing?? :)  from what i can gather, git
> simply doesn't operate in a way where you can "pick and choose" which
> commits you are and are not going to keep around, in order to
> reconstruct the repository.
> 
>  i hope that's right, because i'm counting on it.  i.e i'm counting on
> the following being true:
> 
>  "all copies of all git repositories have exactly the same objects
> such that git pack-object on the exact same ref and the exact same
> object ref will return exactly the same information".
> 
>  if anyone knows a reason why that is NOT the case, please could you tell me!
> 

Commits are always the same for everyone (though two commits you might think of
as "the same commit" may not be in git terms). Branches are pretty much always
subsets or supersets of oneanother. Repositories? Essentially snowflakes.

Try the kernel: Linus has a branch. Most individuals' repos are going to have
some subset of that branch checked out under various names. Not everyone will
have all of the commits though, nor will they necessarily want them just now.
Most people will have no ref pointing to the top commit of the Linus branch; it
will be a couple of commits down due to new things they've added on top. Refs
are NOT resource identifiers, and certainly not global resource identifiers.

Now consider the networking people. They have their own branch. It attaches to
the linus branch somewhere below the tip linus has published (probably at a
revision tag) and includes several unique commits. All the networking people
want those commits. None of the rest of people do. There's a btrfs branch too.
Some people want that, some don't. Some will have the networking and btrfs
branches. Most will have added commits on top privately.

Now consider share by email, where the same commit may appear in several
slightly different forms with different SHA 1s.

In summary, no. Repositories are balls of independently produced content. A
good peer to peer network needs to let any one client individually address
everything out there, but still take advantage of those instances where lots of
people do have copies of the same object.

--CJD

  reply	other threads:[~2010-08-31 17:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 19:59 [RFC PATCH] Introduce git-hive cdahlin
2010-08-30 21:17 ` Luke Kenneth Casson Leighton
2010-08-31  1:29   ` Nguyen Thai Ngoc Duy
2010-08-31 14:38     ` Casey Dahlin
2010-08-31 15:08       ` Luke Kenneth Casson Leighton
2010-08-31 15:52         ` Casey Dahlin
2010-08-31 16:47           ` Luke Kenneth Casson Leighton
2010-08-31 17:20             ` Casey Dahlin [this message]
     [not found]           ` <815C806E-E7DC-4B7D-9B45-4C9B289DFEEF@sb.org>
2010-08-31 19:19             ` Casey Dahlin
2010-08-31 19:21               ` Kevin Ballard
2010-08-31 19:25                 ` Casey Dahlin
2010-09-05 20:08                   ` Tomas Carnecky
2010-09-06  2:28                     ` Casey Dahlin
2010-08-31 19:23           ` Kevin Ballard
2010-09-01  3:56       ` Ilari Liusvaara
2010-09-01  4:07         ` Casey Dahlin
2010-09-05 19:48       ` Giuseppe Bilotta
     [not found]       ` <20100905194810.5940F384096@mbox.dmi.unict.it>
2010-09-06  2:25         ` Casey Dahlin

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=20100831172008.GE16034@foucault.redhat.com \
    --to=cdahlin@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=luke.leighton@gmail.com \
    /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).