Skip to content

pre-commit: switch to git-var to check if username and e-mail are set

Arkadiusz Drabczyk requested to merge ardrabczyk/gitsetup:git-var into hooks

In git, apart from setting username and e-mail in .gitconfig it's also possible to set username in /etc/passwd and set e-mail using EMAIL environment variable. The advantage of this method is that other programs such as mutt or doxygen will pick up these settings up so there is no need to set them separately in each program. Current way of checking if username and e-mail are set using git config results in failure if they are set using this method.

Merge request reports