author | Brandon Casey <drafnel@gmail.com> | |
Sat, 21 Mar 2009 22:26:11 +0000 (17:26 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 22 Mar 2009 04:58:44 +0000 (21:58 -0700) | ||
commit | 094085e3362c592c932b41525ed37152ec171192 | |
tree | e67eb0f1ca5716848e866c25e4a96464a46ad1a9 | tree | snapshot |
parent | 869a3d34c1aea92a10bc8eaa994bd55f4b0b04f2 | commit | diff |
pack-objects: don't loosen objects available in alternate or kept packs
If pack-objects is called with the --unpack-unreachable option then it
will unpack (i.e. loosen) all unreferenced objects from local not-kept
packs, including those that also exist in packs residing in an alternate
object database or a locally kept pack. The only user of this option is
git-repack.
In this case, repack will follow the call to pack-objects with a call to
prune-packed, which will delete these newly loosened objects, making the
act of loosening a waste of time. The unnecessary loosening can be
avoided by checking whether an object exists in a non-local pack or a
locally kept pack before loosening it.
This fixes the 'local packed unreachable obs that exist in alternate ODB
are not loosened' test in t7700.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If pack-objects is called with the --unpack-unreachable option then it
will unpack (i.e. loosen) all unreferenced objects from local not-kept
packs, including those that also exist in packs residing in an alternate
object database or a locally kept pack. The only user of this option is
git-repack.
In this case, repack will follow the call to pack-objects with a call to
prune-packed, which will delete these newly loosened objects, making the
act of loosening a waste of time. The unnecessary loosening can be
avoided by checking whether an object exists in a non-local pack or a
locally kept pack before loosening it.
This fixes the 'local packed unreachable obs that exist in alternate ODB
are not loosened' test in t7700.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c | diff | blob | history | |
t/t7700-repack.sh | diff | blob | history |