Skip to content

Commit

Permalink
builtin/pack-redundant: remove subcommand with breaking changes
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pks-t authored and gitster committed Jan 22, 2025
1 parent 4b5073c commit 68f5187
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions git.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
6 changes: 6 additions & 0 deletions t/t5323-pack-redundant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 68f5187

Please sign in to comment.