[PATCH 2/2] tests: use --file option for git config

Ralph Torres mail at ralphptorr.es
Sun Nov 26 08:26:31 UTC 2023


Running the tests would hijack the user.name and user.email vars of the
global git config file via tests/setup.sh. Prevent that by replacing
the --global option with --file ensuring that tests utilize a local
file instead of the global config file.
---
 tests/setup.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/setup.sh b/tests/setup.sh
index 516f5a41f159..fd1170963145 100644
--- a/tests/setup.sh
+++ b/tests/setup.sh
@@ -39,8 +39,8 @@ fi
 
 export GIT_DIR="$PASSWORD_STORE_DIR/.git"
 export GIT_WORK_TREE="$PASSWORD_STORE_DIR"
-git config --global user.email "Pass-Automated-Testing-Suite at zx2c4.com"
-git config --global user.name "Pass Automated Testing Suite"
+git config --file .gitconfig user.email "Pass-Automated-Testing-Suite at zx2c4.com"
+git config --file .gitconfig user.name "Pass Automated Testing Suite"
 
 
 PASS="$TEST_HOME/../src/password-store.sh"
-- 
2.43.0





More information about the Password-Store mailing list