Re: WARNING: THIS PATCH CAN BREAK YOUR REPO, was Re: [PATCH 2/3] Only repack active packs by skipping over kept packs.
- From
Shawn Pearce <spearce@spearce.org>
- Date
- Oct 30, 2006, 21:55 UTC
- Message-ID
- <20061030215529.GC5775@spearce.org>
- In-Reply-To
- <7v7iyhwk47.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 18 quoted lines
> Shawn Pearce <spearce@spearce.org> writes: > > > Do the above so you have everything in one pack. Now use rev-list > > to simulate the object list construction in pack-objects as though > > we were doing a 'git repack -a -d': > > > > git-rev-list --objects --all \ > > --unpacked=.git/objects/pack/pack-*.pack \ > > | wc -l > > > > gives me 102 (WRONG WRONG WRONG WRONG!!!!!!) > > Now I think I know what is going on. > > The meaning of "unpacked" (with or without the "pretend as if > all objects in this pack are loose") has always been to stop > traversing once we hit a packed object, not "do not include > already packed object".
Did you see Jan Harkes' patch that changes the behavior to be what it should have been?
> So --unpacked=pretend-this-is-loose was wrong to begin with; it > probably should have been --incremental=pretend-this-is-loose.
I don't care about what the option name is. If you want to change it to --incremental we can but the --unpacked actually makes more sense now... Its saying pretend every object in this pack is unpacked and therefore should be packed.
Show 13 quoted lines
> How about reverting the following: > > commit ce8590748b918687abc4c7cd2d432dd23f07ae40 > Author: Shawn Pearce <spearce@spearce.org> > > Only repack active packs by skipping over kept packs. > > > commit 106d710bc13f34aec1a15c4cff80f062f384edf6 > Author: Junio C Hamano <junkio@cox.net> > > pack-objects --unpacked=<existing pack> option. >
Nah. I think Jan's patch fixes the bug and the --unpacked option now makes sense as is, so I don't see why we would revert these.