]> git.ipfire.org Git - thirdparty/git.git/commit
meson: define WITH_BREAKING_CHANGES when enabling breaking changes
authorPatrick Steinhardt <ps@pks.im>
Wed, 12 Mar 2025 13:17:32 +0000 (14:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Mar 2025 16:20:20 +0000 (09:20 -0700)
commit7208d84305254a882eb93449eee0591875814f1b
treefd7d91d760cb27ec0111425fc6eb9c9c33ae63d5
parent87a0bdbf0f72b7561f3cd50636eee33dcb7dbcc3
meson: define WITH_BREAKING_CHANGES when enabling breaking changes

While Meson already supports the `-Dbreaking_changes=true` option, it
only wires up the build option that propagates into the tests. The build
option is only used for our tests to enable the `WITH_BREAKING_CHANGES`
prerequisite though, and does not influence the code that is actually
being built.

The omission went unnoticed because we only have tests right now that
get disabled when breaking changes are enabled, but not the other way
round. In other words, we don't have any tests that verify that breaking
changes behave as expected.

Fix the build issue by setting the `WITH_BREAKING_CHANGES` preprocessor
macro when breaking changes are enabled. Note that the `libgit_c_args`
array is defined after the current spot where we handle the option, so
to not have multiple sites where we handle it we instead move it after
the array has been defined.

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