E474 Should respect XDG for user hooks · Issue #36 · git-hooks/git-hooks · GitHub
[go: up one dir, main page]

Skip to content

Should respect XDG for user hooks #36

@jasonkarns

Description

@jasonkarns

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

The XDG basedir spec outlines the guidelines for applications and tools to store configuration, data, and cache files in a consistent, and user-configurable manner. This specification is aimed at Linux distributions but is 100% compatible with mac and windows as all the variables are derived and default from $HOME (which exists and is specified for both mac and windows).

git itself respects XDG (it respects the config file at $XDG_CONFIG_HOME/git/config)

TL;DR: git-hooks should look for user hooks under ${XDG_CONFIG_HOME:-$HOME/.config}/githooks/ and not ~/.githooks

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

      0