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

Document environment available to hooks #207

Open
harendra-kumar opened this issue Jun 21, 2016 · 1 comment
Open

Document environment available to hooks #207

harendra-kumar opened this issue Jun 21, 2016 · 1 comment
Labels

Comments

@harendra-kumar
Copy link
Contributor

There are many environment variables which are set and exported when the hooks run. But there is no official documentation as to what is available. This makes users to go through the code and use what they find. I am not sure if everything available in the code should really be used unless designed for that purpose and documented.

For example I would like to use VCSH_REPO_NAME in the post-clone hook to initialize any submodules in the repo. Similarly VCSH_COMMAND in the pre-command hook to identify the delete command and deinit any submodules before delete so that I do not have directories lying around even after a delete. But none of these are documented in the man page.

It will be better than nothing if we can just identify and list the valid ones in the man page.

@RichiH
Copy link
Owner

RichiH commented Feb 26, 2017

Anything that's exported can be used in all hooks. I take it a contract which states what variables will never go away would help?

If you want, you can have a go at writing that.

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

No branches or pull requests

2 participants