1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

Fix running tests with non standard default branch

When the global git config has init.defaultbranch set to
something other than master the tests fail. This is because
the tests assume that the default branch is called master
but that may not be the case.

This fixes the tests by ensuring that when running git init
we ensure the default branch is called master regardless of
how git is configured.
This commit is contained in:
Robert Rhoades 2020-10-29 21:13:05 +00:00
parent 51685580c7
commit e6c7ab693e
2 changed files with 2 additions and 2 deletions

View file

@ -58,7 +58,7 @@ class VcsRepositoryTest extends TestCase
}
};
$exec('git init');
$exec('git init -q -b master');
$exec('git config user.email composertest@example.org');
$exec('git config user.name ComposerTest');
$exec('git config commit.gpgsign false');