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

Support inherited .githooksrc settings #7

Open
guillaumeaubert opened this issue Jun 17, 2014 · 2 comments
Open

Support inherited .githooksrc settings #7

guillaumeaubert opened this issue Jun 17, 2014 · 2 comments

Comments

@guillaumeaubert
Copy link
Owner

App::GitHooks supports fallbacks when looking for an appropriate .githooksrc file, in order of decreasing preference:

  1. At the root of the repository.
  2. Specified by the GITHOOKSRC environment variable.
  3. In the user's home directory.

However, this fallback system doesn't currently support inheritance - in other words, if you have a .githooksrc file at the root of a repository, all the other locations are simply ignored. It would be nice to instead have an inheritance system with settings being merged while maintaining the order of preference above when merging conflicting keys.

@timbunce pointed out that Config::GitLike has the same concept of repo-specific config, user config, and global config, plus it already has the inheritance bits built-in, so it seems like a good replacement for Config::Tiny that would make this feature much easier to implement.

@guillaumeaubert
Copy link
Owner Author

The only downside is that the format of the files of Config::GitLike and Config::Tiny are not compatible, so this is a major version change.

Also, a utility would need to be provided to convert from the old format to the new one.

@sjn
Copy link

sjn commented Jul 27, 2016

This is a really, really useful feature. If you somehow can make this happen, that would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants