if not meson.is_subproject()
git = find_program('git', required: false)
if git.found()
run_command(git, 'config', '--local', 'core.hooksPath', meson.source_root()/'.hooks', check: false)
endif
endif
Which isn't great when building pistache not from a git clone but inside another git checkout as it will silently override the git hooks configuration of the parent checkout. An example of this is source based distribution build systems like Buildroot (http://buildroot.org) which has a pistache package.
Maybe check for a .git directory or explicitly pass --git-dir=.git to ensure that only the local git checkout is modified?
meson.build has the following logic:
Which isn't great when building pistache not from a git clone but inside another git checkout as it will silently override the git hooks configuration of the parent checkout. An example of this is source based distribution build systems like Buildroot (http://buildroot.org) which has a pistache package.
Maybe check for a .git directory or explicitly pass --git-dir=.git to ensure that only the local git checkout is modified?