summaryrefslogtreecommitdiff
path: root/morphlib/gitdir.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/gitdir.py')
-rw-r--r--morphlib/gitdir.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/morphlib/gitdir.py b/morphlib/gitdir.py
index 70f9db01..021f35ea 100644
--- a/morphlib/gitdir.py
+++ b/morphlib/gitdir.py
@@ -249,12 +249,16 @@ class Remote(object):
if self.name is not None:
morphlib.git.gitcmd(self.gd._runcmd, 'remote', 'set-url',
self.name, url)
+ if self.push_url is None:
+ self.set_push_url(url)
def set_push_url(self, url):
self.push_url = url
if self.name is not None:
morphlib.git.gitcmd(self.gd._runcmd, 'remote', 'set-url',
'--push', self.name, url)
+ if self.fetch_url is None:
+ self.set_fetch_url(url)
def _get_remote_url(self, remote_name, kind):
# As distasteful as it is to parse the output of porcelain