Brandon Casey <casey@nrlssc.navy.mil> wrote:Copying nothing actually. All of the objects required are in the source repository, so --shared needs nothing additional. Yes, same as above. Except: If --shared has a branch that points at a commit that used to be in source (hence its data isn't in --shared) and that data used to be packed, but source no longer has a reference to it. When you repack source we won't include that commit in the new pack, but we will delete the old pack. That means the commit goes away. Yes... see above about the repack problem. Broken. The repack didn't include the dangling objects. --shared is fubar, on the deleted branch. also fubar, on the deleted branch. You are correct that leaving off the '-d' won't delete objects. But a pack is created by listing the objects we need, and if we don't need the object in source, we don't include it into the new pack. -a -d implies delete all packs that existed when we started the repack. So if an object was in the old packfile, and we didn't copy it to the new packfile, it gets deleted. ;-) Packfiles are immutable. We cannot delete something from it without deleting the entire packfile. ;-) NO!! REPACK IS DANGEROUS ON SHARED REPOS YOU IDIOT!! Exactly because of what I'm saying above, and what you mention about source deleting a branch and repacking or pruning, and --shared then being corrupt because its now missing at least one object it wants to have. Right; but the thing that is shocking to some people (me in my early days with Git) is that a repack is *also* doing a prune if you add -d. Its not quite the same type of prune as it prunes only previously packed objects, but its still a prune. Actually you want `git gc` in your --shared repo now. That way it minimizes the current packfiles. prune-packed only applies to loose objects; not already packed stuff. Since you added a repo with a large packfile to your alternates list you probably want to shrink your own packfile down as much as possible. That works because `git gc` is actually running `git repack -a -d -l`. The -l means "only things that are local to this --shared repository. Right. Yes, exactly. The trick here is that once something enters the shared repo IT MUST STAY THERE. You cannot allow a branch to be deleted from the shared repo, unless it is fully merged into another branch (or tag) that is staying. You also cannot rewind a branch (e.g. push with --force). But I do exactly what you are suggesting. I pull every so often into a the shared common repo and repack it. And then everyone else can repack and their repack deletes things that are in the shared common repo. Just make sure you have a good backup of the shared common repo. :) -- 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
| Jens Axboe | Re: [BUG] New Kernel Bugs |
| KAMEZAWA Hiroyuki | Re: 2.6.24-rc3-mm1 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Jarek Poplawski | Re: [BUG #12364] Re: HTB - very bad precision? HFSC works fine! 2.6.28 |
| Alexey Dobriyan | Re: [GIT]: Networking |
