builtin/pack-redundant: remove subcommand with breaking changes
The git-pack-redundant(1) subcommand has been castrated to require the "--i-still-use-this" option to do anything since 4406522b (pack-redundant: escalate deprecation warning to an error, 2023-03-23), which appeared in Git 2.41 and was announced for removal with 53a92c9552 (Documentation/BreakingChanges: announce removal of git-pack-redundant(1), 2024-09-02). Stop compiling the subcommand in case the `WITH_BREAKING_CHANGES` build flag is set. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt committed
Jan 22, 2025 at 12:31 UTC
68f51871df87d82a504cbcca3230aba570719ba6
3 files changed
+10
Makefile
+2
@@ -1278,7 +1278,9 @@ BUILTIN_OBJS += builtin/mv.o
1278
BUILTIN_OBJS += builtin/name-rev.o
1279
BUILTIN_OBJS += builtin/notes.o
1280
BUILTIN_OBJS += builtin/pack-objects.o
1281
+ifndef WITH_BREAKING_CHANGES
1282
BUILTIN_OBJS += builtin/pack-redundant.o
1283
+endif
1284
BUILTIN_OBJS += builtin/pack-refs.o
1285
BUILTIN_OBJS += builtin/patch-id.o
1286
BUILTIN_OBJS += builtin/prune-packed.o
git.c
+2
@@ -589,7 +589,9 @@ static struct cmd_struct commands[] = {
589
{ "name-rev", cmd_name_rev, RUN_SETUP },
590
{ "notes", cmd_notes, RUN_SETUP },
591
{ "pack-objects", cmd_pack_objects, RUN_SETUP },
592
+#ifndef WITH_BREAKING_CHANGES
593
{ "pack-redundant", cmd_pack_redundant, RUN_SETUP | NO_PARSEOPT },
594
+#endif
595
{ "pack-refs", cmd_pack_refs, RUN_SETUP },
596
{ "patch-id", cmd_patch_id, RUN_SETUP_GENTLY | NO_PARSEOPT },
597
{ "pickaxe", cmd_blame, RUN_SETUP },
t/t5323-pack-redundant.sh
+6
@@ -36,6 +36,12 @@ relationship between packs and objects is as follows:
36
37
. ./test-lib.sh
38
39
+if ! test_have_prereq WITHOUT_BREAKING_CHANGES
40
+then
41
+ skip_all='skipping git-pack-redundant tests; built with breaking changes'
42
+ test_done
43
+fi
44
+
45
main_repo=main.git
46
shared_repo=shared.git
47