Skip to content

Commit 08f7d17

Browse files
committed
FIX regression by gitpython-developers#519 on reading stdout/stderr of cmds
1 parent b3b9c02 commit 08f7d17

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.appveyor.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ environment:
3838
install:
3939
- set PATH=%PYTHON%;%PYTHON%\Scripts;%GIT_PATH%;%PATH%
4040

41-
## Print architecture, python & git used for debugging.
41+
## Print configuration for debugging.
4242
#
4343
- |
44+
echo %PATH%
4445
uname -a
4546
where git git-daemon python pip pip3 pip34
4647
python --version

git/cmd.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,8 @@ def execute(self, command,
539539
cmd_not_found_exception = OSError
540540
# end handle
541541

542-
log.debug("Popen(%s, cwd=%s, universal_newlines=%s", command, cwd, universal_newlines)
542+
log.debug("Popen(%s, cwd=%s, universal_newlines=%s, shell=%s)",
543+
command, cwd, universal_newlines, shell)
543544
try:
544545
proc = Popen(command,
545546
env=env,

git/repo/base.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -899,8 +899,12 @@ def _clone(cls, git, url, path, odb_default_type, progress, **kwargs):
899899
try:
900900
proc = git.clone(url, path, with_extended_output=True, as_process=True,
901901
v=True, **add_progress(kwargs, git, progress))
902-
progress_handler = progress and progress.new_message_handler() or None
903-
handle_process_output(proc, None, progress_handler, finalize_process)
902+
if progress:
903+
handle_process_output(proc, None, progress.new_message_handler(), finalize_process)
904+
else:
905+
(stdout, stderr) = proc.communicate()
906+
finalize_process(proc, stderr=stderr)
907+
# end handle progress
904908
finally:
905909
if prev_cwd is not None:
906910
os.chdir(prev_cwd)

0 commit comments

Comments
 (0)