summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2016-02-07 11:56:19 +0100
committerSebastian Thiel <byronimo@gmail.com>2016-02-07 11:56:19 +0100
commitb145de39700001d91662404221609b86d2c659d0 (patch)
tree0fabc97d33904a232b3b916a4b07b0d62a29e608
parent7b854878fb9df8d1a06c4e97bff5e164957b3a0d (diff)
downloadgitpython-b145de39700001d91662404221609b86d2c659d0.tar.gz
fix(clone): call communicate if there is no progress handler
Previously, it could have happened that pipes ran full, deadlocking the operation Related to #72
-rw-r--r--git/repo/base.py1
-rw-r--r--git/test/test_repo.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/git/repo/base.py b/git/repo/base.py
index d5bc24d8..104261dd 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -827,6 +827,7 @@ class Repo(object):
if progress:
handle_process_output(proc, None, progress.new_message_handler(), finalize_process)
else:
+ proc.communicate()
finalize_process(proc)
# end handle progress
finally:
diff --git a/git/test/test_repo.py b/git/test/test_repo.py
index db3ee62b..a9e6d3c5 100644
--- a/git/test/test_repo.py
+++ b/git/test/test_repo.py
@@ -796,4 +796,4 @@ class TestRepo(TestBase):
worktree_path = join_path_native(rw_dir, 'worktree_repo')
rw_master.git.worktree('add', worktree_path, 'master')
- self.failUnlessRaises(WorkTreeRepositoryUnsupported, Repo, worktree_path)
+ self.failUnlessRaises(InvalidGitRepositoryError, Repo, worktree_path)