nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Make tests pass if user has set git defaultBranch

Open robsyme opened this issue 3 years ago • 0 comments

Two test (AssetManagerTest and LocalRepositoryProviderTest) fail if the user has set their own defaultBranch in ~/.gitconfig.

Before this PR, the tests assume that the git defaultBranch is master and that assumption is hardcoded into the tests. This PR will use the local value if set in the most common way (in .gitconfig without any subsections).

Changing the defaultBranch is increasingly common - Gitlab, Github, and Atlassian have all moved to using main instead of master, so many developers now user main by default. This does not affect the functionality of Nextflow in any way, but ensures that more devs see all green tests when cloning the repo.

To emphasise - this does not change the default branch name in the nextflow repository, and does not affect the name of the default branch name of the repositories created during tests. The only change is that we try to assume less about the dev environment.

robsyme avatar Jul 12 '22 15:07 robsyme