Skip to content

Commit c8e914e

Browse files
committed
cmd, gitpython-developers#525: Always include stdout+stderr in exceptions
+ Ignore `with_extended_output` arg when reaising the exception, keep its behavior when `status==0`.
1 parent 5e6827e commit c8e914e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: git/cmd.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -649,10 +649,7 @@ def as_text(stdout_value):
649649
# END handle debug printing
650650

651651
if with_exceptions and status != 0:
652-
if with_extended_output:
653-
raise GitCommandError(command, status, stderr_value, stdout_value)
654-
else:
655-
raise GitCommandError(command, status, stderr_value)
652+
raise GitCommandError(command, status, stderr_value, stdout_value)
656653

657654
if isinstance(stdout_value, bytes) and stdout_as_string: # could also be output_stream
658655
stdout_value = safe_decode(stdout_value)

0 commit comments

Comments
 (0)