Theodore Tso <tytso@mit.edu> wrote:... Not if I already have a pointer from B to A's refs. repo.or.cz also has this same pointer: git clone --shared A B ln -s A/refs B/refs/forkee If we then do the backpointer we'll get a circular loop between these two repositories and the output of git-ls-remote will be horrid to look at. It will also be confusing when you push, as we'll try to match "refs/forkee/refs/forker/refs/forkee/heads/master"... ;-) The reason I (and repo.or.cz) create the pointer from B to A is so that push and fetch can see that B already has the objects in A and clients shouldn't transfer them, because B already has them. ... Push new things yes. Rewind a branch or delete a branch, no. I actually don't allow pushing into A because it just doesn't make sense in my particular environment for this particular class of A. ... No, it won't work. The problem is that during the first `git --git-dir=A gc` call you are deleting packfiles that may contain objects that B needs. *poof*. They are gone. B cannot traverse its object list to gc itself during the third command. That's why you have to do the hardlinking of *everything* stored in A (even if it is not reachable) into B before you can gc A. The shorter and safest approach is the following, but it will cost a lot of disk space and IO while running: git --git-dir=B repack -a -d ; # yes, really no -l ! git --git-dir=A repack -a -d git --git-dir=B repack -a -d -l ; # yes, now use -l The first repack of B will copy everything from A into B, so that if the repack of A removes the object it will reside in B and B's own repack can keep the object. But if A still has the object then B won't copy it during the final repack of B. You have to use repack here and not gc as gc defaults to including the -l flag. -- Shawn. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Linus Torvalds | Linux 2.6.27-rc8 |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Greg KH | Linux 2.6.25.10 |
git: | |
| Sverre Rabbelier | Git vs Monotone |
| Robert Collins | Re: VCS comparison table |
| Junio C Hamano | Re: git-diff on touched files: bug or feature? |
| Linus Torvalds | Re: [PATCH] Avoid running lstat(2) on the same cache entry. |
| Steve Shockley | Re: Real men don't attack straw men |
| chefren | Re: [Fwd: Open-Hardware] |
| ropers | Re: About Xen: maybe a reiterative question but .. |
| Leon Dippenaar | New tcp stack attack |
| David Miller | Re: [GIT]: Networking |
| Jeff Garzik | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Ilpo Järvinen | Re: [bug] stuck localhost TCP connections, v2.6.26-rc3+ |
| Sangtae Ha | Re: A Linux TCP SACK Question |
