Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiang Xin <zhiyou.jx@alibaba-inc.com>2019-02-02 16:30:17 +0300
committerJunio C Hamano <gitster@pobox.com>2019-02-05 01:18:25 +0300
commit0e37abd2e89d475500e93a6368f1f054ca2fec55 (patch)
tree5ef0d9ab7626daf784ab2d464e8e45d99fe85da2 /t/t5323-pack-redundant.sh
parent4bc0cc12c19f00380052d0cfaf4e71e0a4630f41 (diff)
pack-redundant: consistent sort method
SZEDER reported that test case t5323 has different test result on MacOS. This is because `cmp_pack_list_reverse` cannot give identical result when two pack being sorted has the same size of remaining_objects. Changes to the sorting function will make consistent test result for t5323. The new algorithm to find redundant packs is a trade-off to save memory resources, and the result of it may be different with old one, and may be not the best result sometimes. Update t5323 for the new algorithm. Reported-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5323-pack-redundant.sh')
-rwxr-xr-xt/t5323-pack-redundant.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh
index e859965489..6b4d1ca353 100755
--- a/t/t5323-pack-redundant.sh
+++ b/t/t5323-pack-redundant.sh
@@ -165,15 +165,15 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '
# | T A B C D E F G H I J K L M N O P Q R
# ----+--------------------------------------
# P1 | x x x x x x x x
-# P2* | ! ! ! ! ! ! !
-# P3 | x x x x x x
+# P2 | x x x x x x x
+# P3* | ! ! ! ! ! !
# P4 | x x x x x
# P5 | x x x x
# ----+--------------------------------------
# ALL | x x x x x x x x x x x x x x x x x x
#
#############################################################################
-test_expect_failure 'master: one of pack-2/pack-3 is redundant (failed on Mac)' '
+test_expect_success 'master: one of pack-2/pack-3 is redundant' '
create_pack_in "$master_repo" P4 <<-EOF &&
$J
$K
@@ -190,7 +190,7 @@ test_expect_failure 'master: one of pack-2/pack-3 is redundant (failed on Mac)'
(
cd "$master_repo" &&
cat >expect <<-EOF &&
- P2:$P2
+ P3:$P3
EOF
git pack-redundant --all >out &&
format_packfiles <out >actual &&
@@ -214,7 +214,7 @@ test_expect_failure 'master: one of pack-2/pack-3 is redundant (failed on Mac)'
# ALL | x x x x x x x x x x x x x x x x x x x
#
#############################################################################
-test_expect_failure 'master: pack 2, 4, and 6 are redundant (failed on Mac)' '
+test_expect_success 'master: pack 2, 4, and 6 are redundant' '
create_pack_in "$master_repo" P6 <<-EOF &&
$N
$O
@@ -254,7 +254,7 @@ test_expect_failure 'master: pack 2, 4, and 6 are redundant (failed on Mac)' '
# ALL | x x x x x x x x x x x x x x x x x x x
#
#############################################################################
-test_expect_failure 'master: pack-8 (subset of pack-1) is also redundant (failed on Mac)' '
+test_expect_success 'master: pack-8 (subset of pack-1) is also redundant' '
create_pack_in "$master_repo" P8 <<-EOF &&
$A
EOF
@@ -281,7 +281,7 @@ test_expect_success 'master: clean loose objects' '
)
'
-test_expect_failure 'master: remove redundant packs and pass fsck (failed on Mac)' '
+test_expect_success 'master: remove redundant packs and pass fsck' '
(
cd "$master_repo" &&
git pack-redundant --all | xargs rm &&
@@ -301,7 +301,7 @@ test_expect_success 'setup shared.git' '
)
'
-test_expect_failure 'shared: all packs are redundant, but no output without --alt-odb (failed on Mac)' '
+test_expect_success 'shared: all packs are redundant, but no output without --alt-odb' '
(
cd "$shared_repo" &&
git pack-redundant --all >out &&
@@ -334,7 +334,7 @@ test_expect_failure 'shared: all packs are redundant, but no output without --al
# ALL | x x x x x x x x x x x x x x x x x x x
#
#############################################################################
-test_expect_failure 'shared: show redundant packs in stderr for verbose mode (failed on Mac)' '
+test_expect_success 'shared: show redundant packs in stderr for verbose mode' '
(
cd "$shared_repo" &&
cat >expect <<-EOF &&