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

aurpublish setup doesn't effectively work when global core.hooksPath is set #21

Open
thiagowfx opened this issue Jan 2, 2022 · 2 comments

Comments

@thiagowfx
Copy link

thiagowfx commented Jan 2, 2022

If the user as a global core.hooksPath hook set (example: yours truly), aurpublish setup doesn't work.

One needs to explicitly set git config core.hooksPath .git/hooks in the aurpublish-backed repository.

Thinking a bit deeper about this, I don't think it's an aurpublish bug per se, it feels more like a bug in git.

I'd argue git should honor the implicit local hooks path over the global one if at least one hook exists therein.

Anyway, just wanted to file this as a heads up. aurpublish could optionally take care of this defensively by calling git config core.hooksPath .git/hooks as part of aurpublish setup. If you would like a PR I am happy do send you one. If you think this is unnecessary, feel free to close the issue, of course.

@thiagowfx thiagowfx changed the title aurpublish setup doesn't effectively work when global core.hooksPath is set aurpublish setup doesn't effectively work when global core.hooksPath is set Jan 2, 2022
thiagowfx added a commit to thiagowfx/PKGBUILDs that referenced this issue Jan 2, 2022
hooksPath is needed because it doesn't work when we set a global
hooksPath in ~/.gitconfig

eli-schwartz/aurpublish#21
@eli-schwartz
Copy link
Owner

Thinking a bit deeper about this, I don't think it's an aurpublish bug per se, it feels more like a bug in git.

I'd argue git should honor the implicit local hooks path over the global one if at least one hook exists therein.

A counter-argument is that if you temporarily override the hooks location you should not need to delete your hooks directory just to make git respect your explicitly set option.

If you would like a PR I am happy do send you one. If you think this is unnecessary, feel free to close the issue, of course.

I would accept a patch for this, yes.

@thiagowfx
Copy link
Author

I would accept a patch for this, yes.

Oh, it has been a while :D

Do you agree with the suggested proposal, then?

aurpublish could optionally take care of this defensively by calling git config core.hooksPath .git/hooks as part of aurpublish setup

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