Skip to content

Commit 68f5187

Browse files
pks-tgitster
authored andcommitted
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 4406522 (pack-redundant: escalate deprecation warning to an error, 2023-03-23), which appeared in Git 2.41 and was announced for removal with 53a92c9 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4b5073c commit 68f5187

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,9 @@ BUILTIN_OBJS += builtin/mv.o
12781278
BUILTIN_OBJS += builtin/name-rev.o
12791279
BUILTIN_OBJS += builtin/notes.o
12801280
BUILTIN_OBJS += builtin/pack-objects.o
1281+
ifndef WITH_BREAKING_CHANGES
12811282
BUILTIN_OBJS += builtin/pack-redundant.o
1283+
endif
12821284
BUILTIN_OBJS += builtin/pack-refs.o
12831285
BUILTIN_OBJS += builtin/patch-id.o
12841286
BUILTIN_OBJS += builtin/prune-packed.o

git.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,9 @@ static struct cmd_struct commands[] = {
589589
{ "name-rev", cmd_name_rev, RUN_SETUP },
590590
{ "notes", cmd_notes, RUN_SETUP },
591591
{ "pack-objects", cmd_pack_objects, RUN_SETUP },
592+
#ifndef WITH_BREAKING_CHANGES
592593
{ "pack-redundant", cmd_pack_redundant, RUN_SETUP | NO_PARSEOPT },
594+
#endif
593595
{ "pack-refs", cmd_pack_refs, RUN_SETUP },
594596
{ "patch-id", cmd_patch_id, RUN_SETUP_GENTLY | NO_PARSEOPT },
595597
{ "pickaxe", cmd_blame, RUN_SETUP },

t/t5323-pack-redundant.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ relationship between packs and objects is as follows:
3636

3737
. ./test-lib.sh
3838

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+
3945
main_repo=main.git
4046
shared_repo=shared.git
4147

0 commit comments

Comments
 (0)