author | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 22 Dec 2006 00:49:06 +0000 (19:49 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 22 Dec 2006 07:01:57 +0000 (23:01 -0800) | ||
commit | 71b03b42c637d884295b48d4f5d830a5f5f3578b | |
tree | 1568f576e074e03407cf47304b1b8f4031378151 | tree | snapshot |
parent | 90cee090a0d7f950130d50df123551e43843e679 | commit | diff |
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>
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 | diff | blob | history |