Skip to content

git configuration (hooks.global) doesn't expand the given path #41

@jasonkarns

Description

@jasonkarns

Until #36 is resolved, I'm attempting to work around by setting the global hook dir to be $XDG_CONFIG_HOME/git/hooks:

$ git config hooks.global
~/.config/git/hooks

But running git hooks doesn't detect that configuration or that the directory exists:

$ git hooks
Git hooks ARE installed in this repository.
Contrib hooks

And accordingly, the hooks in that global directory are not invoked on the relevant git actions.

Update: It's not ignored per-se. The issue is that ~ (or $HOME) in the configured hooks.global path are not expanded. And there doesn't seem to be any warning that the path is set (but "doesn't exist"), so it just silently fails. (Is there no verbose or debug mode to trace these things?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions