Subject: 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 <[email-masked]>
Date: Mon, 30 Oct 2006 16:55:29 -0500

Junio C Hamano <[email-masked]> wrote:
> Shawn Pearce <[email-masked]> 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.
 
> How about reverting the following:
> 
> commit ce8590748b918687abc4c7cd2d432dd23f07ae40
> Author: Shawn Pearce <[email-masked]>
> 
>     Only repack active packs by skipping over kept packs.
> 
> 
> commit 106d710bc13f34aec1a15c4cff80f062f384edf6
> Author: Junio C Hamano <[email-masked]>
> 
>     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.

--