mercredi 20 juillet 2016

How to know if a git hook is being called from not within the terminal/command line

I have a git hook that is running whenever some one commits to their local repository.

Some people are committing from the terminal and some people are committing from SourceTree or SmartGit or some other 3rd party application.

SourceTree behaves differently when it comes to hooks. For example, errors are red by default, and user input doesn't seem to be supported so I need to change my python scripts depending on whether or not the user is committing from SourceTree or SmartGit etc.

Is there any way to do this within my script?

Aucun commentaire:

Enregistrer un commentaire