shallow: add repository argument to is_repository_shallow
[gitweb.git] / builtin / fetch.c
index c1f2df979652a3361e364de2b1c011e479176d27..55140671ef367a37338808c3c285c0566aa68175 100644 (file)
@@ -1445,7 +1445,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
        if (unshallow) {
                if (depth)
                        die(_("--depth and --unshallow cannot be used together"));
-               else if (!is_repository_shallow())
+               else if (!is_repository_shallow(the_repository))
                        die(_("--unshallow on a complete repository does not make sense"));
                else
                        depth = xstrfmt("%d", INFINITE_DEPTH);