Merge branch 'jx/clean-interactive'
[gitweb.git] / transport-helper.c
index 4c2a39e8ff03df5285657a5c0f9b7746c28d76a6..b32e2d64dd344c3f8c4d5f42b6c48dd6bdb8d29f 100644 (file)
@@ -28,7 +28,8 @@ struct helper_data {
                connect : 1,
                signed_tags : 1,
                check_connectivity : 1,
-               no_disconnect_req : 1;
+               no_disconnect_req : 1,
+               no_private_update : 1;
        char *export_marks;
        char *import_marks;
        /* These go from remote name (as in "list") to private name */
@@ -208,6 +209,8 @@ static struct child_process *get_helper(struct transport *transport)
                        strbuf_addstr(&arg, "--import-marks=");
                        strbuf_addstr(&arg, capname + strlen("import-marks "));
                        data->import_marks = strbuf_detach(&arg, NULL);
+               } else if (!prefixcmp(capname, "no-private-update")) {
+                       data->no_private_update = 1;
                } else if (mandatory) {
                        die("Unknown mandatory capability %s. This remote "
                            "helper probably needs newer version of Git.",
@@ -738,7 +741,7 @@ static void push_update_refs_status(struct helper_data *data,
                if (push_update_ref_status(&buf, &ref, remote_refs))
                        continue;
 
-               if (!data->refspecs)
+               if (!data->refspecs || data->no_private_update)
                        continue;
 
                /* propagate back the update to the remote namespace */