aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-04-08 14:11:20 -0700
committerJunio C Hamano <gitster@pobox.com>2025-04-08 14:11:20 -0700
commit5a4d746bb6ddb7c156dbd31cef780eab10c3a60a (patch)
tree0719f60f53981d77f7f3c3aa446b3d0583139c8c
parent9d22ac51228304102deb62f30c3ecba6377e1237 (diff)
parentd2827dc31e6769ddd552a34593d28cecd5f3392d (diff)
downloadgit-5a4d746bb6ddb7c156dbd31cef780eab10c3a60a.tar.xz
Merge branch 'es/meson-build-skip-coccinelle' into kn/meson-hdr-check
* es/meson-build-skip-coccinelle: meson: disable coccinelle configuration when building from a tarball
-rw-r--r--contrib/coccinelle/meson.build7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/coccinelle/meson.build b/contrib/coccinelle/meson.build
index 5d76a7fee6..ea054c924f 100644
--- a/contrib/coccinelle/meson.build
+++ b/contrib/coccinelle/meson.build
@@ -1,4 +1,9 @@
-spatch = find_program('spatch', required: get_option('coccinelle'))
+coccinelle_opt = get_option('coccinelle').require(
+ fs.exists(meson.project_source_root() / '.git'),
+ error_message: 'coccinelle can only be run from a git checkout',
+)
+
+spatch = find_program('spatch', required: coccinelle_opt)
if not spatch.found()
subdir_done()
endif