Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build should not silently override git hooks configuration #1126

Open
jacmet opened this issue Mar 22, 2023 · 1 comment
Open

build should not silently override git hooks configuration #1126

jacmet opened this issue Mar 22, 2023 · 1 comment

Comments

@jacmet
Copy link

jacmet commented Mar 22, 2023

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?

@Tachi107
Copy link
Member

Hi @jacmet, thanks for the report. Yeah checking for a .git directory could be doable. Patches welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants