setup-user: switch to git-var to check if username and e-mail are set
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).