diff options
author | Michael Mercier <michael.mercier@ryax.tech> | 2021-03-15 17:54:48 +0100 |
---|---|---|
committer | Michael Mercier <michael.mercier@ryax.tech> | 2021-03-15 18:00:05 +0100 |
commit | f7968d136276607115907267b3be89c3ff9acd03 (patch) | |
tree | 505d533c942747f57785a449df4e2a7612cd2e77 /git/cmd.py | |
parent | f7180d50f785ec28963e12e647d269650ad89b31 (diff) | |
download | gitpython-f7968d136276607115907267b3be89c3ff9acd03.tar.gz |
Put remove password in the utils and use it also in cmd.execute
Diffstat (limited to 'git/cmd.py')
-rw-r--r-- | git/cmd.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -28,7 +28,7 @@ from git.compat import ( is_win, ) from git.exc import CommandError -from git.util import is_cygwin_git, cygpath, expand_path +from git.util import is_cygwin_git, cygpath, expand_path, remove_password_if_present from .exc import ( GitCommandError, @@ -682,8 +682,10 @@ class Git(LazyMixin): :note: If you add additional keyword arguments to the signature of this method, you must update the execute_kwargs tuple housed in this module.""" + # Remove password for the command if present + redacted_command = remove_password_if_present(command) if self.GIT_PYTHON_TRACE and (self.GIT_PYTHON_TRACE != 'full' or as_process): - log.info(' '.join(command)) + log.info(' '.join(redacted_command)) # Allow the user to have the command executed in their working dir. cwd = self._working_dir or os.getcwd() |