Skip to content

Use the correct git method to find the hooks directory #1006

@dalewking

Description

@dalewking

What would you like to be able to do?

Where the hooks directory is located is not as simple as finding a .git folder in the parent directories. With things like git work trees or git config you can put the hooks directory anywhere. The correct way to get the path for hooks is:

git rev-parse --git-path hooks

It is nice that you at least allow setting the directory but you should be trying this command in the plugin. If that fails you can fall back to your current method

If you have any ideas on how this should be implemented, please tell us here.

Try running: git rev-parse --git-path hooks

Is this a feature you are interested in implementing yourself?

No, I could but I do not have time or will to

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions