summaryrefslogtreecommitdiff
path: root/git/remote.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-02-21 10:12:11 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-02-21 10:14:59 +0100
commite0acb8371bb2b68c2bda04db7cb2746ba3f9da86 (patch)
treedad907401197e27fee983e420cc780f48cd6a463 /git/remote.py
parentbfcdf2bef08f17b4726b67f06c84be3bfe2c39b8 (diff)
downloadgitpython-e0acb8371bb2b68c2bda04db7cb2746ba3f9da86.tar.gz
Added 'insert_kwargs_after' flag for consumption by _call_process.
While at it, all other invocations of .git in remote.py were reviewed Fixes #262
Diffstat (limited to 'git/remote.py')
-rw-r--r--git/remote.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/git/remote.py b/git/remote.py
index 2267c203..8911aaa4 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -477,7 +477,9 @@ class Remote(LazyMixin, Iterable):
:param kwargs: Additional arguments to be passed to the git-remote add command
:return: New Remote instance
:raise GitCommandError: in case an origin with that name already exists"""
- repo.git.remote("add", name, url, **kwargs)
+ scmd = 'add'
+ kwargs['insert_kwargs_after'] = scmd
+ repo.git.remote(scmd, name, url, **kwargs)
return cls(repo, name)
# add is an alias
@@ -517,7 +519,9 @@ class Remote(LazyMixin, Iterable):
Additional arguments passed to git-remote update
:return: self """
- self.repo.git.remote("update", self.name, **kwargs)
+ scmd = 'update'
+ kwargs['insert_kwargs_after'] = scmd
+ self.repo.git.remote(scmd, self.name, **kwargs)
return self
def _get_fetch_info_from_stderr(self, proc, progress):