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

hooks queried in <workdir>/.git/hooks #1046

Closed
extrawurst opened this issue Dec 15, 2021 · 1 comment · Fixed by #1048 or #1049
Closed

hooks queried in <workdir>/.git/hooks #1046

extrawurst opened this issue Dec 15, 2021 · 1 comment · Fixed by #1048 or #1049
Labels
bug Something isn't working
Milestone

Comments

@extrawurst
Copy link
Owner

in order to implement #1044 we need to first clean up that hooks are currently read from <workdir>/.git/hooks/... this breaks as soon as someone uses the new --workdir arg and the hooks are placed in some other place inside .git.

@extrawurst extrawurst added the bug Something isn't working label Dec 15, 2021
@extrawurst extrawurst added this to the v0.20 milestone Dec 15, 2021
extrawurst pushed a commit that referenced this issue Dec 15, 2021
extrawurst pushed a commit that referenced this issue Dec 15, 2021
@extrawurst extrawurst reopened this Dec 16, 2021
@extrawurst
Copy link
Owner Author

we need to make sure the hooks still get the correct current-working-dir:

Before Git invokes a hook, it changes its working directory to either $GIT_DIR in a bare repository or the root of the working tree in a non-bare repository. An exception are hooks triggered during a push (pre-receive, update, post-receive, post-update, push-to-checkout) which are always executed in $GIT_DIR.

extrawurst pushed a commit that referenced this issue Dec 16, 2021
@extrawurst extrawurst linked a pull request Dec 16, 2021 that will close this issue
extrawurst pushed a commit that referenced this issue Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant