Only repack active packs by skipping over kept packs.
commitce8590748b918687abc4c7cd2d432dd23f07ae40
authorShawn Pearce <spearce@spearce.org>
Sun, 29 Oct 2006 09:37:54 +0000 (29 04:37 -0500)
committerJunio C Hamano <junkio@cox.net>
Sun, 29 Oct 2006 20:46:21 +0000 (29 12:46 -0800)
treebcf008a75c38ad40a8da08d52ab5ab0b99c90e7b
parentd4ff6d92c3d7020233a9b4990a3545ee54a5c033
Only repack active packs by skipping over kept packs.

During `git repack -a -d` only repack objects which are loose or
which reside in an active (a non-kept) pack.  This allows the user
to keep large packs as-is without continuous repacking and can be
very helpful on large repositories.  It should also help us resolve
a race condition between `git repack -a -d` and the new pack store
functionality in `git-receive-pack`.

Kept packs are those which have a corresponding .keep file in
$GIT_OBJECT_DIRECTORY/pack.  That is pack-X.pack will be kept
(not repacked and not deleted) if pack-X.keep exists in the same
directory when `git repack -a -d` starts.

Currently this feature is not documented and there is no user
interface to keep an existing pack.

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