@@ -405,7 +405,7 @@ def read_all_from_possibly_closed_stream(stream):
405405if status != 0 :
406406errstr = read_all_from_possibly_closed_stream (self .proc .stderr )
407407log .debug ('AutoInterrupt wait stderr: %r' % (errstr ,))
408- raise GitCommandError (self .args ,status ,errstr )
408+ raise GitCommandError (remove_password_if_present ( self .args ) ,status ,errstr )
409409# END status handling
410410return status
411411# END auto interrupt
@@ -638,7 +638,7 @@ def execute(self, command,
638638
639639 :param env:
640640 A dictionary of environment variables to be passed to `subprocess.Popen`.
641-
641+
642642 :param max_chunk_size:
643643 Maximum number of bytes in one chunk of data passed to the output_stream in
644644 one invocation of write() method. If the given number is not positive then
@@ -706,7 +706,7 @@ def execute(self, command,
706706if is_win :
707707cmd_not_found_exception = OSError
708708if kill_after_timeout :
709- raise GitCommandError (command ,'"kill_after_timeout" feature is not supported on Windows.' )
709+ raise GitCommandError (redacted_command ,'"kill_after_timeout" feature is not supported on Windows.' )
710710else :
711711if sys .version_info [0 ]> 2 :
712712cmd_not_found_exception = FileNotFoundError # NOQA # exists, flake8 unknown @UndefinedVariable
@@ -721,7 +721,7 @@ def execute(self, command,
721721if istream :
722722istream_ok = "<valid stream>"
723723log .debug ("Popen(%s, cwd=%s, universal_newlines=%s, shell=%s, istream=%s)" ,
724- command ,cwd ,universal_newlines ,shell ,istream_ok )
724+ redacted_command ,cwd ,universal_newlines ,shell ,istream_ok )
725725try :
726726proc = Popen (command ,
727727env = env ,
@@ -737,7 +737,7 @@ def execute(self, command,
737737** subprocess_kwargs
738738 )
739739except cmd_not_found_exception as err :
740- raise GitCommandNotFound (command ,err )from err
740+ raise GitCommandNotFound (redacted_command ,err )from err
741741
742742if as_process :
743743return self .AutoInterrupt (proc ,command )
@@ -787,7 +787,7 @@ def _kill_process(pid):
787787watchdog .cancel ()
788788if kill_check .isSet ():
789789stderr_value = ('Timeout: the command "%s" did not complete in %d '
790- 'secs.' % (" " .join (command ),kill_after_timeout ))
790+ 'secs.' % (" " .join (redacted_command ),kill_after_timeout ))
791791if not universal_newlines :
792792stderr_value = stderr_value .encode (defenc )
793793# strip trailing "\n"
@@ -811,7 +811,7 @@ def _kill_process(pid):
811811proc .stderr .close ()
812812
813813if self .GIT_PYTHON_TRACE == 'full' :
814- cmdstr = " " .join (command )
814+ cmdstr = " " .join (redacted_command )
815815
816816def as_text (stdout_value ):
817817return not output_stream and safe_decode (stdout_value )or '<OUTPUT_STREAM>'
@@ -827,7 +827,7 @@ def as_text(stdout_value):
827827# END handle debug printing
828828
829829if with_exceptions and status != 0 :
830- raise GitCommandError (command ,status ,stderr_value ,stdout_value )
830+ raise GitCommandError (redacted_command ,status ,stderr_value ,stdout_value )
831831
832832if isinstance (stdout_value ,bytes )and stdout_as_string :# could also be output_stream
833833stdout_value = safe_decode (stdout_value )