Skip to content

Commit

Permalink
Disabling system/global git configs
Browse files Browse the repository at this point in the history
  • Loading branch information
spog committed Oct 25, 2024
1 parent d0a520d commit 08c2ae4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/setup
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,18 @@ if [ ! -d "${SCRIPT_DIR}/../.git" ]; then
git config user.name "YouUser"
git add .
git commit -a -m"Initial commit"
git config --list
fi

# Disable any GIT configuration set outside this 'git-subrepo' project.
# This prevents specific build environment GIT settings to influence
# execution of the test suite.
export XDG_CONFIG_HOME=$SCRIPT_DIR
export HOME=$SCRIPT_DIR
export GIT_CONFIG_NOSYSTEM=1
# To be able to view current GIT confirguration during tests execution,
# run the test suite by adding the '-v' option to the prove command.
git config --list

# Generate additional testing git repos, if not already present.
mkdir -p "${SCRIPT_DIR}/repo"
if [ ! -d "${SCRIPT_DIR}/repo/bar" ]; then
Expand Down

0 comments on commit 08c2ae4

Please sign in to comment.