Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions git/repo/base.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -900,8 +900,10 @@ def init(cls, path=None, mkdir=True, odbt=DefaultDBType, expand_vars=True, **kwa

@classmethod
def _clone(cls, git, url, path, odb_default_type, progress, **kwargs):
as_process = False
if progress is not None:
progress = to_progress_instance(progress)
as_process = True

odbt = kwargs.pop('odbt', odb_default_type)

Expand All@@ -917,14 +919,10 @@ def _clone(cls, git, url, path, odb_default_type, progress, **kwargs):
sep_dir = kwargs.get('separate_git_dir')
if sep_dir:
kwargs['separate_git_dir'] = Git.polish_url(sep_dir)
proc = git.clone(Git.polish_url(url), clone_path, with_extended_output=True, as_process=True,
v=True, **add_progress(kwargs, git, progress))
proc = git.clone(Git.polish_url(url), clone_path, with_extended_output=True,
as_process=as_process, v=True, **add_progress(kwargs, git, progress))
if progress:
handle_process_output(proc, None, progress.new_message_handler(), finalize_process)
else:
(stdout, stderr) = proc.communicate()
log.debug("Cmd(%s)'s unused stdout: %s", getattr(proc, 'args', ''), stdout)
finalize_process(proc, stderr=stderr)

# our git command could have a different working dir than our actual
# environment, hence we prepend its working dir if required
Expand Down