test_helper: Don't clobber global name/email config

Config included by gitconfig [include] is not considered global.

Test git config values without --global to include local config as well.

Change only local config (not global) if needed.
This commit is contained in:
Tom "Ravi" Hale
2018-08-27 18:04:20 +07:00
parent b193438ca1
commit ed63b41182

View File

@@ -4,9 +4,9 @@ orig_cwd="$PWD"
source "$scmbDir/lib/git/helpers.sh" source "$scmbDir/lib/git/helpers.sh"
# Set up demo git user if not configured # Set up demo git user if not configured
if [ -z "$(git config --global user.email)" ]; then if [ -z "$(git config user.email)" ]; then
git config --global user.email "testuser@example.com" git config user.email "testuser@example.com"
git config --global user.name "Test User" git config user.name "Test User"
fi fi
# #