Merge branch 'mm/mediawiki-as-a-remote'
[gitweb.git] / builtin / remote.c
index 82cd59e303b51a58440211511bc757dd1599765c..f2a9c26dc3494c0881ca3f91b44785c4b52caae7 100644 (file)
@@ -183,8 +183,8 @@ static int add(int argc, const char **argv)
 
        if (mirror && master)
                die("specifying a master branch makes no sense with --mirror");
-       if (mirror && track.nr)
-               die("specifying branches to track makes no sense with --mirror");
+       if (mirror && !(mirror & MIRROR_FETCH) && track.nr)
+               die("specifying branches to track makes sense only with fetch mirrors");
 
        name = argv[0];
        url = argv[1];
@@ -1103,7 +1103,7 @@ static int show(int argc, const char **argv)
                        url = states.remote->url;
                        url_nr = states.remote->url_nr;
                }
-               for (i=0; i < url_nr; i++)
+               for (i = 0; i < url_nr; i++)
                        printf("  Push  URL: %s\n", url[i]);
                if (!i)
                        printf("  Push  URL: %s\n", "(no URL)");