Skip to content

setup-user: switch to git-var to check if username and e-mail are set

Brad King requested to merge brad.king/gitsetup:setup-user-check-var into setup

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 the 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. The previous way of checking if username and e-mail are set using git config results in failure if they are set using this method.

Instead use GIT_AUTHOR_IDENT when rev and cut tools are available to parse out the relevant components.

See cmake/cmake!4084 (merged) and cmake/cmake!4612 (merged).

Merge request reports