git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 4/5] builtin/pack-redundant: remove subcommand with breaking changes

From
Patrick Steinhardt <ps@pks.im>
Date
Jan 6, 2025, 07:51 UTC
Message-ID
<20250106-pks-remote-branches-deprecation-v2-4-2ce87c053536@pks.im>
In-Reply-To
<20250106-pks-remote-branches-deprecation-v2-0-2ce87c053536@pks.im>

The git-pack-redundant(1) subcommand has been 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>
---
 Makefile                  | 2 ++
 git.c                     | 2 ++
 t/t5323-pack-redundant.sh | 6 ++++++
 3 files changed, 10 insertions(+)
diff --git a/Makefile b/Makefile
index dc3c980aa7a4f42d27ed72415a636ac82b2a5684..e6b0d859803ac4d53079ec2a39143441a5662203 100644
--- 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
--- 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 },
diff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh
index 8dbbcc5e51c06d7c5f56fcb3107860fcb66a5106..688cd9706c876a7edcaf0bcd642ae08ece188d4d 100755
--- a/t/t5323-pack-redundant.sh
+++ b/t/t5323-pack-redundant.sh
@@ -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
 
-- 
2.48.0.rc1.245.gb3e6e7acbc.dirty
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 19 of 47 in “remote: announce removal of "branches/" and "remotes/"”
  1. 0/5 remote: announce removal of "branches/" and "remotes/"Patrick Steinhardt, Dec 11, 2024
  2. 1/5 Makefile: wire up build option for deprecated featuresPatrick Steinhardt, Dec 11, 2024
  3. Kristoffer HaugsbakkDec 11, 2024
  4. Patrick SteinhardtDec 13, 2024
  5. 2/5 ci: merge linux-gcc-default into linux-gccPatrick Steinhardt, Dec 11, 2024
  6. 3/5 ci: repurpose "linux-gcc" job for deprecationsPatrick Steinhardt, Dec 11, 2024
  7. 4/5 builtin/pack-redundant: remove subcommand with breaking changesPatrick Steinhardt, Dec 11, 2024
  8. 5/5 remote: announce removal of "branches/" and "remotes/"Patrick Steinhardt, Dec 11, 2024
  9. 0/5 remote: announce removal of "branches/" and "remotes/"Patrick Steinhardt, Jan 6, 2025
  10. 1/5 Makefile: wire up build option for deprecated featuresPatrick Steinhardt, Jan 6, 2025
  11. Christian CouderJan 6, 2025
  12. Christian CouderJan 6, 2025
  13. 2/5 ci: merge linux-gcc-default into linux-gccPatrick Steinhardt, Jan 6, 2025
  14. Christian CouderJan 6, 2025
  15. Junio C HamanoJan 6, 2025
  16. Patrick SteinhardtJan 7, 2025
  17. Christian CouderJan 7, 2025
  18. 3/5 ci: repurpose "linux-gcc" job for deprecationsPatrick Steinhardt, Jan 6, 2025
  19. 4/5 builtin/pack-redundant: remove subcommand with breaking changesPatrick Steinhardt, Jan 6, 2025
  20. 5/5 remote: announce removal of "branches/" and "remotes/"Patrick Steinhardt, Jan 6, 2025
  21. Christian CouderJan 6, 2025
  22. Junio C HamanoJan 6, 2025
  23. Patrick SteinhardtJan 7, 2025
  24. Junio C HamanoJan 7, 2025
  25. Junio C HamanoJan 7, 2025
  26. rsbecker@nexbridge.comJan 7, 2025
  27. Patrick SteinhardtJan 8, 2025
  28. Junio C HamanoJan 8, 2025
  29. Patrick SteinhardtJan 9, 2025
  30. Robert CoupJan 9, 2025
  31. Patrick SteinhardtJan 9, 2025
  32. Junio C HamanoJan 9, 2025
  33. Junio C HamanoJan 6, 2025
  34. Patrick SteinhardtJan 7, 2025
  35. Junio C HamanoJan 7, 2025
  36. 0/5 remote: announce removal of "branches/" and "remotes/"Patrick Steinhardt, Jan 22, 2025
  37. 1/5 Makefile: wire up build option for deprecated featuresPatrick Steinhardt, Jan 22, 2025
  38. 2/5 ci: merge linux-gcc-default into linux-gccPatrick Steinhardt, Jan 22, 2025
  39. 3/5 ci: repurpose "linux-gcc" job for deprecationsPatrick Steinhardt, Jan 22, 2025
  40. 4/5 builtin/pack-redundant: remove subcommand with breaking changesPatrick Steinhardt, Jan 22, 2025
  41. 5/5 remote: announce removal of "branches/" and "remotes/"Patrick Steinhardt, Jan 22, 2025
  42. Junio C HamanoJan 22, 2025
  43. Jakub WilkFeb 21, 2025
  44. Junio C HamanoFeb 21, 2025
  45. Patrick SteinhardtFeb 25, 2025
  46. Junio C HamanoFeb 25, 2025
  47. Patrick SteinhardtFeb 26, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.