push: add a config option push.gpgSign for default signed pushes
[gitweb.git] / fetch-pack.c
index 48526aa54bbb8458a10fc178f4fa5a429b77bc87..849a9d627535a303d6db4a4f49a2af42fb89dffb 100644 (file)
@@ -790,7 +790,7 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
        sort_ref_list(&ref, ref_compare_name);
        qsort(sought, nr_sought, sizeof(*sought), cmp_ref_by_name);
 
-       if (is_repository_shallow() && !server_supports("shallow"))
+       if ((args->depth > 0 || is_repository_shallow()) && !server_supports("shallow"))
                die("Server does not support shallow clients");
        if (server_supports("multi_ack_detailed")) {
                if (args->verbose)