Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Closed
Description
I have tried to initialize a repository using a short path which contains "~", a exception be raised:
>>> repo = git.Repo.init("~/test.git", bare=True)Traceback (most recent call last): File "<input>", line 1, in <module> File ".../lib/python2.7/site-packages/git/repo/base.py", line 657, in init return Repo(path) File ".../lib/python2.7/site-packages/git/repo/base.py", line 98, in __init__ raise NoSuchPathError(epath)NoSuchPathError: /home/username/test.git
If I create the target directory first, it will be another exception:
Traceback (most recent call last): File "<input>", line 1, in <module> File ".../lib/python2.7/site-packages/git/repo/base.py", line 657, in init return Repo(path) File ".../lib/python2.7/site-packages/git/repo/base.py", line 122, in __init__ raise InvalidGitRepositoryError(epath)InvalidGitRepositoryError: /home/username/test.git
But while I use the full path without any character~
instead of, it works.
>>> repo = git.Repo.init("/home/username/test.git", bare=True)>>> repo<git.Repo "/home/username/test.git">>>>