Code

remote: allow "-t" with fetch mirrors
[git.git] / builtin / remote.c
index eb1229d68917131e98c4830fa184045f82fcedad..aa7111824d9d19086752b1bc28d10515389e0ac3 100644 (file)
@@ -193,8 +193,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];