diff options
author | Jingyang Liang <simple.continue@gmail.com> | 2021-04-22 15:26:18 +0800 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2021-04-23 07:23:07 +0800 |
commit | 36440f79bddc2c1aa4a7a3dd8c2557dca3926639 (patch) | |
tree | fce1bc836118eb2daaaa3e5a0a80d8de87788d94 | |
parent | 3211ae9dbfc6aadd2dd1d7d0f9f3af37ead19383 (diff) | |
download | gitpython-36440f79bddc2c1aa4a7a3dd8c2557dca3926639.tar.gz |
Fix missing stderr when the progress parameter of _clone is None
-rw-r--r-- | git/repo/base.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index a28c9d28..b1d0cdbc 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -988,8 +988,6 @@ class Repo(object): def _clone(cls, git: 'Git', url: PathLike, path: PathLike, odb_default_type: Type[GitCmdObjectDB], progress: Optional[Callable], multi_options: Optional[List[str]] = None, **kwargs: Any ) -> 'Repo': - progress_checked = to_progress_instance(progress) - odbt = kwargs.pop('odbt', odb_default_type) # when pathlib.Path or other classbased path is passed @@ -1012,9 +1010,9 @@ class Repo(object): if multi_options: multi = ' '.join(multi_options).split(' ') proc = git.clone(multi, Git.polish_url(url), clone_path, with_extended_output=True, as_process=True, - v=True, universal_newlines=True, **add_progress(kwargs, git, progress_checked)) - if progress_checked: - handle_process_output(proc, None, progress_checked.new_message_handler(), + v=True, universal_newlines=True, **add_progress(kwargs, git, progress)) + if progress: + handle_process_output(proc, None, to_progress_instance(progress).new_message_handler(), finalize_process, decode_streams=False) else: (stdout, stderr) = proc.communicate() |