summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git/cmd.py6
-rw-r--r--git/config.py9
-rw-r--r--git/remote.py4
3 files changed, 7 insertions, 12 deletions
diff --git a/git/cmd.py b/git/cmd.py
index 9b2abc71..3fa24fff 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -279,8 +279,10 @@ class Git(LazyMixin):
self.proc = None
if proc.stdin:
proc.stdin.close()
- proc.stdout.close()
- proc.stderr.close()
+ if proc.stdout:
+ proc.stdout.close()
+ if proc.stderr:
+ proc.stderr.close()
# did the process finish already so we have a return code ?
if proc.poll() is not None:
diff --git a/git/config.py b/git/config.py
index ea5e17be..51b15989 100644
--- a/git/config.py
+++ b/git/config.py
@@ -160,14 +160,7 @@ class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, obje
OPTVALUEONLY = re.compile(optvalueonly_source)
- OPTCRE = re.compile(
- optvalueonly_source # very permissive, incuding leading whitespace
- + r'\s*(?P<vi>[:=])\s*' # any number of space/tab,
- # followed by separator
- # (either : or =), followed
- # by any # space/tab
- + r'(?P<value>.*)$' # everything up to eol
- )
+ OPTCRE = re.compile(optvalueonly_source + r'\s*(?P<vi>[:=])\s*' + r'(?P<value>.*)$')
del optvalueonly_source
diff --git a/git/remote.py b/git/remote.py
index c1969768..1baacb1b 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -650,7 +650,7 @@ class Remote(LazyMixin, Iterable):
else:
args = [refspec]
- proc = self.repo.git.fetch(self, *args, with_extended_output=True, as_process=True, with_stdout=False, v=True,
+ proc = self.repo.git.fetch(self, *args, as_process=True, with_stdout=False, v=True,
**kwargs)
res = self._get_fetch_info_from_stderr(proc, progress or RemoteProgress())
if hasattr(self.repo.odb, 'update_cache'):
@@ -667,7 +667,7 @@ class Remote(LazyMixin, Iterable):
:return: Please see 'fetch' method """
self._assert_refspec()
kwargs = add_progress(kwargs, self.repo.git, progress)
- proc = self.repo.git.pull(self, refspec, with_extended_output=True, as_process=True, v=True, **kwargs)
+ proc = self.repo.git.pull(self, refspec, with_stdout=False, as_process=True, v=True, **kwargs)
res = self._get_fetch_info_from_stderr(proc, progress or RemoteProgress())
if hasattr(self.repo.odb, 'update_cache'):
self.repo.odb.update_cache()