pistache
pistache copied to clipboard
build should not silently override git hooks configuration
meson.build has the following logic:
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?
Hi @jacmet, thanks for the report. Yeah checking for a .git directory could be doable. Patches welcome!
I'm willing to make a PR for this to fix Buildroot's case, but I may want to bump the minimum meson to 0.53.2 to leverage https://mesonbuild.com/Release-notes-for-0-53-0.html#a-new-module-for-filesystem-operations
While this could maybe be done via run_command
, the fs
semantics are cleaner and built specifically for use cases like this.
I see https://github.com/pistacheio/pistache/pull/870 specifically requests 0.50.0 so before I start i want to check what a reasonable minimal meson version is.
Hey @vfazio. I think bumping the minimum should be fine. Both Ubuntu and Debian have had at least 0.53.2 available since focal and bullseye respectively. Just remember to also bump the minimum in debian/control
.
Hey @vfazio. I think bumping the minimum should be fine. Both Ubuntu and Debian have had at least 0.53.2 available since focal and bullseye respectively. Just remember to also bump the minimum in
debian/control
.
@kiplingw so, it looks like a separate MR to the debian
branch to bump that? per https://github.com/pistacheio/pistache/pull/974
Correct. You'll need to submit two concurrently.