summaryrefslogtreecommitdiff
path: root/git/remote.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/remote.py')
-rw-r--r--git/remote.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/remote.py b/git/remote.py
index a7d3fe7e..8a46b2c5 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -29,7 +29,7 @@ from git.util import (
join_path,
finalize_process
)
-from git.cmd import handle_process_output
+from git.cmd import handle_process_output, Git
from gitdb.util import join
from git.compat import (defenc, force_text, is_win)
import logging
@@ -570,7 +570,7 @@ class Remote(LazyMixin, Iterable):
:raise GitCommandError: in case an origin with that name already exists"""
scmd = 'add'
kwargs['insert_kwargs_after'] = scmd
- repo.git.remote(scmd, name, url, **kwargs)
+ repo.git.remote(scmd, name, Git.polish_url(url), **kwargs)
return cls(repo, name)
# add is an alias