summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-11-25 15:52:55 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-11-25 15:53:13 (GMT)
commite17934c1834ef249107ba5fd46d5e6c2c9017534 (patch)
treed977d0e20b4c8bb0bd7ee054fdbf6bc18e133afe
parent58da842063cc80e34ce3ae16aa8c5fb16cdc29dd (diff)
parent5129e97285339ad0a481ffdd148bb9e09848a2f4 (diff)
downloadCMake-e17934c1834ef249107ba5fd46d5e6c2c9017534.zip
CMake-e17934c1834ef249107ba5fd46d5e6c2c9017534.tar.gz
CMake-e17934c1834ef249107ba5fd46d5e6c2c9017534.tar.bz2
Merge topic 'git-var'
5129e97285 setup-user: switch to git-var to check if username and e-mail are set Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4084
-rwxr-xr-xUtilities/GitSetup/setup-user8
1 files changed, 4 insertions, 4 deletions
diff --git a/Utilities/GitSetup/setup-user b/Utilities/GitSetup/setup-user
index 1af439c..0b98879 100755
--- a/Utilities/GitSetup/setup-user
+++ b/Utilities/GitSetup/setup-user
@@ -20,12 +20,12 @@
# Project configuration instructions: NONE
for (( ; ; )); do
- user_name=$(git config user.name || echo '') &&
- user_email=$(git config user.email || echo '') &&
- if test -n "$user_name" -a -n "$user_email"; then
+ ident="$(git var GIT_AUTHOR_IDENT 2>/dev/null | rev | cut -d' ' -f3- | rev)"
+
+ if test -n "$ident"; then
echo 'Your commits will record as Author:
- '"$user_name <$user_email>"'
+ '"$ident"'
' &&
read -ep 'Is the author name and email address above correct? [Y/n] ' correct &&
if test "$correct" != "n" -a "$correct" != "N"; then