Skip to content

Commit f425df6

Browse files
cottsayleander-dsouza
authored andcommitted
Explicitly set a static global git configuration
Some of the vcs2l tests have expectations that certain git configuration values are set. We should ignore any custom user configurations and explicitly set the configuration values for those variables that are assumed by the tests. Signed-off-by: Scott K Logan <logans@cottsay.net>
1 parent b5980ce commit f425df6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/gitconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[core]
2+
abbrev = 7
3+
4+
[init]
5+
defaultBranch = main

test/test_commands.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ def run_command(command, args=None, subfolder=None):
399399
script = os.path.join(repo_root, 'scripts', 'vcs-' + command)
400400
env = dict(os.environ)
401401
env.update(
402+
GIT_CONFIG_GLOBAL=os.path.join(repo_root, 'test', 'gitconfig'),
402403
LANG='en_US.UTF-8',
403404
PYTHONPATH=repo_root + os.pathsep + env.get('PYTHONPATH', ''),
404405
)

0 commit comments

Comments
 (0)