Don't crash during repack of a reflog with pruned commits.
authorShawn O. Pearce <spearce@spearce.org>
Fri, 22 Dec 2006 00:49:06 +0000 (19:49 -0500)
committerJunio C Hamano <junkio@cox.net>
Fri, 22 Dec 2006 07:01:57 +0000 (23:01 -0800)
commit71b03b42c637d884295b48d4f5d830a5f5f3578b
tree1568f576e074e03407cf47304b1b8f4031378151
parent90cee090a0d7f950130d50df123551e43843e679
Don't crash during repack of a reflog with pruned commits.

If the user has been using reflog for a long time (e.g. since its
introduction) then it is very likely that an existing branch's
reflog may still mention commits which have long since been pruned
out of the repository.

Rather than aborting with a very useless error message during
git-repack, pack as many valid commits as we can get from the
reflog and let the user know that the branch's reflog contains
already pruned commits.  A future 'git reflog expire' (or whatever
it finally winds up being called) can then be performed to expunge
those reflog entries.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
revision.c