From: Junio C Hamano Date: Mon, 25 Jan 2021 22:19:17 +0000 (-0800) Subject: Merge branch 'jc/deprecate-pack-redundant' X-Git-Tag: v2.31.0-rc0~105 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dfcd90506998c1de8d8ef86431c86ef9ed626c30;p=thirdparty%2Fgit.git Merge branch 'jc/deprecate-pack-redundant' Warn loudly when the "pack-redundant" command, which has been left stale with almost unusable performance issues, gets used, as we no longer want to recommend its use (instead just "repack -d" instead). * jc/deprecate-pack-redundant: pack-redundant: gauge the usage before proposing its removal --- dfcd90506998c1de8d8ef86431c86ef9ed626c30 diff --cc t/t5323-pack-redundant.sh index 7e3340843f,2dd2d67b9e..543cb4c6a8 --- a/t/t5323-pack-redundant.sh +++ b/t/t5323-pack-redundant.sh @@@ -112,17 -114,6 +114,17 @@@ test_expect_success 'setup master repo create_commits_in "$master_repo" A B C D E F G H I J K L M N O P Q R ' +test_expect_success 'master: pack-redundant works with no packfile' ' + ( + cd "$master_repo" && + cat >expect <<-EOF && + fatal: Zero packs found! + EOF - test_must_fail git pack-redundant --all >actual 2>&1 && ++ test_must_fail $git_pack_redundant --all >actual 2>&1 && + test_cmp expect actual + ) +' + ############################################################################# # Chart of packs and objects for this test case # @@@ -144,26 -137,6 +146,26 @@@ test_expect_success 'master: pack-redun $F $R EOF + ( + cd "$master_repo" && - git pack-redundant --all >out && ++ $git_pack_redundant --all >out && + test_must_be_empty out + ) +' + +############################################################################# +# Chart of packs and objects for this test case +# +# | 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 | x x x x x x x +# P3 | x x x x x x +# ----+-------------------------------------- +# ALL | x x x x x x x x x x x x x x x +# +############################################################################# +test_expect_success 'master: no redundant for pack 1, 2, 3' ' create_pack_in "$master_repo" P2 <<-EOF && $B $C