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

Source hooks instead of calling them? #68

Open
RichiH opened this issue Jul 26, 2013 · 3 comments
Open

Source hooks instead of calling them? #68

RichiH opened this issue Jul 26, 2013 · 3 comments

Comments

@RichiH
Copy link
Owner

RichiH commented Jul 26, 2013

That would allow hooks to be a lot more powerful. But if there's an exit() in a hook today...

Or introduce a new kind of hook that's sourced:

source-post-clone
post-clone
@lyda
Copy link
Contributor

lyda commented Nov 17, 2016

The downside is that it means hooks must be shell scripts.

Perhaps only do it if the file isn't executable?

Note, should probably not run/source files that end in ~ as that's a common backup file for things like emacs.

@alerque
Copy link
Collaborator

alerque commented Apr 3, 2021

By default I think hooks should stick closely to the Git hook handling: They should be executable in order to even be considered, and they should just be left to do their thing. As @lyda noted this means hooks can be in any language the user wants to support, something I take advantage of quite a bit.

If the ability to affect the parent environment is really needed we could setup some way of indicating that a particular hook should be sourced or allow it's output to be evaled or something like that, but lets not go sourcing all hooks by default.

@alerque
Copy link
Collaborator

alerque commented Apr 3, 2021

cf. #177 and #207

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

No branches or pull requests

3 participants