@matheusbsbs / matheus-bagliano / commits / 171110a4a6
Fork 0

git-repack.sh: don't use --kept-pack-only option to pack-objects

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. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Casey committed Mar 19, 2009 at 22:47 UTC 171110a4a67f04c28d2ac89385ab88ba051fc780
2 files changed +2 -6
git-repack.sh
+1 -5
@@ -71,11 +71,7 @@ case ",$all_into_one," in
71 existing="$existing $e"
72 fi
73 done
74 - if test -n "$existing"
75 - then
76 - args="--kept-pack-only"
77 - fi
78 - if test -n "$args" -a -n "$unpack_unreachable" -a \
74 + if test -n "$existing" -a -n "$unpack_unreachable" -a \
75 -n "$remove_redundant"
76 then
77 args="$args $unpack_unreachable"
t/t7700-repack.sh
+1 -1
@@ -69,7 +69,7 @@ test_expect_success 'packed obs in alt ODB are repacked even when local repo is
69 done
70 '
71
72 -test_expect_failure 'packed obs in alternate ODB kept pack are repacked' '
72 +test_expect_success 'packed obs in alternate ODB kept pack are repacked' '
73 # swap the .keep so the commit object is in the pack with .keep
74 for p in alt_objects/pack/*.pack
75 do