Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Failed to initialize repository while the path contains "~" #83

Closed
Assignees
Byron
@tonyseek

Description

@tonyseek

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">>>>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp