diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-01 20:14:50 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-12 23:31:43 +0200 |
commit | 8ea7e265d1549613c12cbe42a2e012527c1a97e4 (patch) | |
tree | d49cdc8f66ac7dd90a3aff91c7955c94639afe6b /git/cmd.py | |
parent | e3165753f9d0d69caabac74eee195887f3fea482 (diff) | |
download | gitpython-8ea7e265d1549613c12cbe42a2e012527c1a97e4.tar.gz |
repo, cmd: DROP UNEEDED Win path for chcwd & check for '~' homedir
+ Do not abspath twice when contructing cloned repo.
+ Add `git.repo.base` logger.
Diffstat (limited to 'git/cmd.py')
-rw-r--r-- | git/cmd.py | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -42,12 +42,12 @@ from .util import ( ) -execute_kwargs = set(('istream', 'with_keep_cwd', 'with_extended_output', +execute_kwargs = set(('istream', 'with_extended_output', 'with_exceptions', 'as_process', 'stdout_as_string', 'output_stream', 'with_stdout', 'kill_after_timeout', 'universal_newlines', 'shell')) -log = logging.getLogger('git.cmd') +log = logging.getLogger(__name__) log.addHandler(logging.NullHandler()) __all__ = ('Git',) @@ -418,7 +418,6 @@ class Git(LazyMixin): def execute(self, command, istream=None, - with_keep_cwd=False, with_extended_output=False, with_exceptions=True, as_process=False, @@ -441,11 +440,6 @@ class Git(LazyMixin): :param istream: Standard input filehandle passed to subprocess.Popen. - :param with_keep_cwd: - Whether to use the current working directory from os.getcwd(). - The cmd otherwise uses its own working_dir that it has been initialized - with if possible. - :param with_extended_output: Whether to return a (status, stdout, stderr) tuple. @@ -518,10 +512,7 @@ class Git(LazyMixin): log.info(' '.join(command)) # Allow the user to have the command executed in their working dir. - if with_keep_cwd or self._working_dir is None: - cwd = os.getcwd() - else: - cwd = self._working_dir + cwd = self._working_dir or os.getcwd() # Start the process env = os.environ.copy() |