]> git.ipfire.org Git - thirdparty/git.git/commitdiff
meson: don't compile git-pack-redundant(1) with breaking changes
authorPatrick Steinhardt <ps@pks.im>
Wed, 12 Mar 2025 13:17:33 +0000 (14:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Mar 2025 16:20:21 +0000 (09:20 -0700)
We continue to compile the git-pack-redundant(1) builtin with Meson when
breaking changes are enabled even though we ultimately don't expose this
command at all. This is mostly harmless, but given that the intent of
the build option is to be as close as possible to the state where the
breaking change has been fully implemented this isn't optimal either.

Improve the situation by not compiling the builtin when breaking changes
are enabled.

Based-on-patch-by: Phillip Wood <phillip.wood123@gmail.com>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
meson.build

index 4ddc44f510dd1f28b651cff53dbd14241659a6dc..6b0eb6430aff2b7ed6d8ab354e0dd158a1d42f34 100644 (file)
@@ -581,7 +581,6 @@ builtin_sources = [
   'builtin/name-rev.c',
   'builtin/notes.c',
   'builtin/pack-objects.c',
-  'builtin/pack-redundant.c',
   'builtin/pack-refs.c',
   'builtin/patch-id.c',
   'builtin/prune-packed.c',
@@ -632,6 +631,10 @@ builtin_sources = [
   'builtin/write-tree.c',
 ]
 
+if not get_option('breaking_changes')
+  builtin_sources += 'builtin/pack-redundant.c'
+endif
+
 builtin_sources += custom_target(
   output: 'config-list.h',
   command: [