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

GitUp does not execute pre-commit/pre-push hook for worktrees #1053

Open
matthewhively opened this issue Feb 27, 2025 · 0 comments
Open

GitUp does not execute pre-commit/pre-push hook for worktrees #1053

matthewhively opened this issue Feb 27, 2025 · 0 comments

Comments

@matthewhively
Copy link

The title more or less says it all.
When I have a worktree open in gitup, and I commit or push, it always succeeds.
But the same changeset when I have the base repo open in gitup, fails as expected.
As a note: in terminal both trigger the hooks as expected.

Can easily be tested with the following pre-commit hook.

#!/bin/bash
echo 'test pre-commit'
exit 1

Same issue with pre-push.

I could have sworn this worked at some point, but maybe I'm mis-remembering.

For reference
git config --local --list:

core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
extensions.worktreeconfig=true

and then in the worktree
git config --worktree --list

core.hookspath=~/my_project/.git/hooks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant