]> git.ipfire.org Git - thirdparty/git.git/blobdiff - transport.c
builtin/clone.c: add --reject-shallow option
[thirdparty/git.git] / transport.c
index 1c4ab676d1b148835431106d99766545c31da721..b231894f90395aade755aee408d92dd3be566e2b 100644 (file)
@@ -236,6 +236,9 @@ static int set_git_option(struct git_transport_options *opts,
                list_objects_filter_die_if_populated(&opts->filter_options);
                parse_list_objects_filter(&opts->filter_options, value);
                return 0;
+       } else if (!strcmp(name, TRANS_OPT_REJECT_SHALLOW)) {
+               opts->reject_shallow = !!value;
+               return 0;
        }
        return 1;
 }
@@ -370,6 +373,7 @@ static int fetch_refs_via_pack(struct transport *transport,
        args.stateless_rpc = transport->stateless_rpc;
        args.server_options = transport->server_options;
        args.negotiation_tips = data->options.negotiation_tips;
+       args.reject_shallow_remote = transport->smart_options->reject_shallow;
 
        if (!data->got_remote_heads) {
                int i;