From ed63b41182a9abe2c4339adde2fe9ae9b7430eaf Mon Sep 17 00:00:00 2001 From: "Tom \"Ravi\" Hale" Date: Mon, 27 Aug 2018 18:04:20 +0700 Subject: [PATCH] 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. --- test/support/test_helper.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/support/test_helper.sh b/test/support/test_helper.sh index 4649373..d5a9854 100644 --- a/test/support/test_helper.sh +++ b/test/support/test_helper.sh @@ -4,9 +4,9 @@ orig_cwd="$PWD" source "$scmbDir/lib/git/helpers.sh" # Set up demo git user if not configured -if [ -z "$(git config --global user.email)" ]; then - git config --global user.email "testuser@example.com" - git config --global user.name "Test User" +if [ -z "$(git config user.email)" ]; then + git config user.email "testuser@example.com" + git config user.name "Test User" fi #