Merge branch 'jk/prune-mtime'
[gitweb.git] / builtin / remote.c
index 33ff7e06e71945d8cc12b479acd2e61664ebc655..5d3ab906bc7ef6cc8cc9c65a3b86cf4c1ff443fb 100644 (file)
@@ -180,7 +180,9 @@ static int add(int argc, const char **argv)
        url = argv[1];
 
        remote = remote_get(name);
-       if (remote && (remote->url_nr > 1 || strcmp(name, remote->url[0]) ||
+       if (remote && (remote->url_nr > 1 ||
+                       (strcmp(name, remote->url[0]) &&
+                               strcmp(url, remote->url[0])) ||
                        remote->fetch_refspec_nr))
                die(_("remote %s already exists."), name);