[PATCH 2/5] git-repack.sh: don't use --kept-pack-only option to pack-objects
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Mar 20, 2009, 03:47 UTC
- Message-ID
- <t_s5aa51o2kq_ePRWgLTEg6KbvKii55gDA1y-1oKgx9KP4EKyrqg8sDFaph97G5MPoLgUx_vx48@cipher.nrlssc.navy.mil>
- In-Reply-To
- <t_s5aa51o2kq_ePRWgLTEpak5ue1ZM7YICzIF-RsnmN68psiOC0Tnz9bsH5tTxgVEU0bxG-OtJ8@cipher.nrlssc.navy.mil>
The --kept-pack-only option to pack-objects treats all kept packs as equal. This results in objects that reside in an alternate pack that has a .keep file, not being packed into a newly created pack when the user specifies the -a option to repack. Since the user may not have any control over the alternate database, git should not refrain from repacking those objects even though they are in a pack with a .keep file.
This fixes the 'packed obs in alternate ODB kept pack are repacked' test in t7700. --- git-repack.sh | 6 +----- t/t7700-repack.sh | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/git-repack.sh b/git-repack.sh index 0144c2d..1782a23 100755 --- a/git-repack.sh +++ b/git-repack.sh @@ -71,11 +71,7 @@ case ",$all_into_one," in existing="$existing $e" fi done - if test -n "$existing" - then - args="--kept-pack-only" - fi - if test -n "$args" -a -n "$unpack_unreachable" -a \ + if test -n "$existing" -a -n "$unpack_unreachable" -a \ -n "$remove_redundant" then args="$args $unpack_unreachable" diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh index e869995..1242c9d 100755 --- a/t/t7700-repack.sh +++ b/t/t7700-repack.sh @@ -88,7 +88,7 @@ test_expect_failure 'packed obs in alt ODB are repacked when local repo has pack done ' -test_expect_failure 'packed obs in alternate ODB kept pack are repacked' ' +test_expect_success 'packed obs in alternate ODB kept pack are repacked' ' # swap the .keep so the commit object is in the pack with .keep for p in alt_objects/pack/*.pack do
-- 1.6.2.16.geb16e