]> git.ipfire.org Git - thirdparty/git.git/commitdiff
builtin/pack-redundant: remove subcommand with breaking changes
authorPatrick Steinhardt <ps@pks.im>
Wed, 22 Jan 2025 11:31:32 +0000 (12:31 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Jan 2025 20:34:05 +0000 (12:34 -0800)
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>
Makefile
git.c
t/t5323-pack-redundant.sh

index dc3c980aa7a4f42d27ed72415a636ac82b2a5684..e6b0d859803ac4d53079ec2a39143441a5662203 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1278,7 +1278,9 @@ BUILTIN_OBJS += builtin/mv.o
 BUILTIN_OBJS += builtin/name-rev.o
 BUILTIN_OBJS += builtin/notes.o
 BUILTIN_OBJS += builtin/pack-objects.o
+ifndef WITH_BREAKING_CHANGES
 BUILTIN_OBJS += builtin/pack-redundant.o
+endif
 BUILTIN_OBJS += builtin/pack-refs.o
 BUILTIN_OBJS += builtin/patch-id.o
 BUILTIN_OBJS += builtin/prune-packed.o
diff --git a/git.c b/git.c
index 46b3c740c5d665388917c6eee3052cc3ef8368f2..a13c32bcdc694460fcafe8079d3aa6e8caea1b4c 100644 (file)
--- a/git.c
+++ b/git.c
@@ -589,7 +589,9 @@ static struct cmd_struct commands[] = {
        { "name-rev", cmd_name_rev, RUN_SETUP },
        { "notes", cmd_notes, RUN_SETUP },
        { "pack-objects", cmd_pack_objects, RUN_SETUP },
+#ifndef WITH_BREAKING_CHANGES
        { "pack-redundant", cmd_pack_redundant, RUN_SETUP | NO_PARSEOPT },
+#endif
        { "pack-refs", cmd_pack_refs, RUN_SETUP },
        { "patch-id", cmd_patch_id, RUN_SETUP_GENTLY | NO_PARSEOPT },
        { "pickaxe", cmd_blame, RUN_SETUP },
index 8dbbcc5e51c06d7c5f56fcb3107860fcb66a5106..688cd9706c876a7edcaf0bcd642ae08ece188d4d 100755 (executable)
@@ -36,6 +36,12 @@ relationship between packs and objects is as follows:
 
 . ./test-lib.sh
 
+if ! test_have_prereq WITHOUT_BREAKING_CHANGES
+then
+       skip_all='skipping git-pack-redundant tests; built with breaking changes'
+       test_done
+fi
+
 main_repo=main.git
 shared_repo=shared.git