-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Description
The feature request
I would like to have a way for my git hook scripts to know if they're being run from Github Desktop, as opposed to another interface e.g. running git from the command line.
My motivation is that I have found certain activities in my pre-commit hook cause Github Desktop to become unresponsive. I'll open a separate issue about this once I understand better what's going on, but for now I would like to be able to exit the commit if these activities need to be run and the hook is being run via Github Desktop.
Proposed solution
Set an shell environmental variable, such as:
export GIT_INTERFACE="GithubDesktop"
I don't know enough about the internals of Github Desktop to give much more detail here, but from briefly looking at the source code, this might actually require feature request for dugite?
Anyway, wherever/however the git binary is being executed, would it be possible to just set an environment variable beforehand?
Additional context
No response