jupyterhub / jupyterhub/nbgitpuller
Changing default branch makes all tests fail
Open
bug
- Dominant language
- Python
- Stars
- 237
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
### Bug description
If you have changed the default branch name on your computer, as `git init` now suggests, all nbgitpuller tests fail.
### How to reproduce
```bash
# The following fails:
git config --global init.defaultBranch main
python -m pytest tests/test_gitpuller.py
# This works again:
git config --global init.defaultBranch master
python -m pytest tests/test_gitpuller.py
```
I think this is because `repohelpers.py` hardcodes the master branch name, but when creating test repos doesn't specify a name. I'll look into it next week, it should not be too hard.
Contributor guide
Assessment
This issue has not been assessed yet.