Skip to content

Bug with clone #639

Closed
Closed
@r0mainK

Description

So there seems to be problem with clone for versions 0.19.3 and 0.19.4, this is what I get:

Python 3.6.5 (default, Mar 30 2018, 06:41:53) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from dulwich.porcelain import clone
>>> clone("https://github.com/src-d/models", target=".")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/dulwich/porcelain.py", line 325, in clone
    fetch_result = fetch(r, host_path, origin, message=reflog_message)
  File "/usr/local/lib/python3.6/site-packages/dulwich/porcelain.py", line 1078, in fetch
    fetch_result = client.fetch(path, r, progress=errstream.write)
  File "/usr/local/lib/python3.6/site-packages/dulwich/client.py", line 1026, in fetch
    with self._open_repo(path) as r:
  File "/usr/local/lib/python3.6/site-packages/dulwich/client.py", line 959, in _open_repo
    return closing(Repo(path))
  File "/usr/local/lib/python3.6/site-packages/dulwich/repo.py", line 773, in __init__
    "No git repository was found at %(path)s" % dict(path=root)
dulwich.errors.NotGitRepository: No git repository was found at /src-d/models

I tried with 0.19.2 and cloned my repo successfully. I haven't tried with other python versions, and havent time to look into it now but yeah its kinda problematic. At the location of the repo the repository is empty apart from the .git repository, which seems to have created a new and empty git repo:

:) romain ~ (k8s: local-gpu) (git: master) $ find tests_dulwich/
tests_dulwich/
tests_dulwich//.git
tests_dulwich//.git/config
tests_dulwich//.git/objects
tests_dulwich//.git/objects/pack
tests_dulwich//.git/objects/info
tests_dulwich//.git/HEAD
tests_dulwich//.git/info
tests_dulwich//.git/info/exclude
tests_dulwich//.git/description
tests_dulwich//.git/hooks
tests_dulwich//.git/refs
tests_dulwich//.git/refs/heads
tests_dulwich//.git/refs/tags
tests_dulwich//.git/branches

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions