]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/deprecate-pack-redundant'
authorJunio C Hamano <gitster@pobox.com>
Mon, 25 Jan 2021 22:19:17 +0000 (14:19 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Jan 2021 22:19:18 +0000 (14:19 -0800)
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

1  2 
builtin/pack-redundant.c
t/t5323-pack-redundant.sh

Simple merge
index 7e3340843fe570d7624d33390803d6820817ad4f,2dd2d67b9ea53072969f8f89f69c6223c5dff596..543cb4c6a87781916b9fe86fbc1fd3decad6a9e4
@@@ -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_must_fail git pack-redundant --all >actual 2>&1 &&
 +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_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
-               git pack-redundant --all >out &&
 +      (
 +              cd "$master_repo" &&
++              $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