The .git extension of certain git repo urls should not propagate to targetPath and urlPath default values
Bug description
Consider a git url such as https://gitlab.u-psud.fr/Info111/ComputerLab.git, which is typical from gitlab.
Expected behaviour
The normal behavior of git clone is to produce a directory called ComputerLab,
without the .git extension. One would expect nbgitpuller to behave similarly.
Actual behaviour
Both nbgitpuller and nbgitpuller's url generator keep the .git extension, in the targetPath and urlPath
How to reproduce
- Go to https://jupyterhub.github.io/nbgitpuller/link?hub=https://datahub.berkeley.edu&repo=https://gitlab.u-psud.fr/Info111/ComputerLab.git
- Check the produced URL
- Replace the hub URL by your own
- Try the produced URL
- Check the name of the directory created
Your personal set up
nbgitpuller 0.10.2 jupyterhub 1.3.0
Work around
The problem can be worked around by setting explicitly targetPath and urlPath
Note
Rather than stripping manually the .git extension, it could be safer and more general to ask git for the directory name. This round-trip may be overkill though, especially for the url generator.
Thanks in advance! (and big kudos for nbgitpuller which makes distributing material to newbies so much easier for them, and thus for us)