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

Appearance settings

Hang in git.Repo.clone_from() [Inter-process Communication Problem] #72

Copy link
Copy link

Description

@mandaarp
Issue body actions

Task:
Clone from a remote repository having ssh://abc@domain.com/git/remote_repo format, which has submodules included from the outside of domain.com.

Problem:
current_repository = git.Repo.clone_from(r"ssh://abc@domain.com/git/remote_repo", r"d:\temp")

the remote_repo has 313 objects (files and folders). Above method call hangs after fetching 294 objects. Total size of remote_repo is 82 MB.

Observations:

  1. Command Prompt: "git clone -v ssh://abc@domain.com/git/remote_repo d:\temp" works
  2. Git Bash: "git clone -v ssh://abc@domain.com/git/remote_repo d:\temp" works
  3. Python interpreter: os.system("git clone -v ssh://abc@domain.com/git/remote_repo d:\temp") works

Possible but incomplete solution:

there is some problem with stderr=PIPE parameter of subprocess.Popen call in execute method of Python27\Lib\site-packages\GitPython-0.3.2.RC1-py2.7.egg\git\cmd.py.

If I change the code to below:

            err_file = open("d:\\err.txt","w")
    # Start the process
    proc = Popen(command,
                    cwd=cwd,
                    stdin=istream,
                    stderr=err_file,
                    #stderr=PIPE,
                    stdout=PIPE,
                    close_fds=(os.name=='posix'),# unsupported on linux
                    **subprocess_kwargs
                    )

The process does not hang.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.