+struct upload_pack_data {
+ struct string_list symref; /* v0 only */
+ struct object_array want_obj;
+ struct object_array have_obj;
+ struct oid_array haves; /* v2 only */
+ struct string_list wanted_refs; /* v2 only */
+
+ struct object_array shallows;
+ struct string_list deepen_not;
+ struct object_array extra_edge_obj;
+ int depth;
+ timestamp_t deepen_since;
+ int deepen_rev_list;
+ int deepen_relative;
+ int keepalive;
+ int shallow_nr;
+ timestamp_t oldest_have;
+
+ unsigned int timeout; /* v0 only */
+ enum {
+ NO_MULTI_ACK = 0,
+ MULTI_ACK = 1,
+ MULTI_ACK_DETAILED = 2
+ } multi_ack; /* v0 only */
+
+ /* 0 for no sideband, otherwise DEFAULT_PACKET_MAX or LARGE_PACKET_MAX */
+ int use_sideband;
+
+ struct string_list uri_protocols;
+ enum allow_uor allow_uor;
+
+ struct list_objects_filter_options filter_options;
+ struct string_list allowed_filters;
+
+ struct packet_writer writer;
+
+ const char *pack_objects_hook;
+
+ unsigned stateless_rpc : 1; /* v0 only */
+ unsigned no_done : 1; /* v0 only */
+ unsigned daemon_mode : 1; /* v0 only */
+ unsigned filter_capability_requested : 1; /* v0 only */
+
+ unsigned use_thin_pack : 1;
+ unsigned use_ofs_delta : 1;
+ unsigned no_progress : 1;
+ unsigned use_include_tag : 1;
+ unsigned allow_filter : 1;
+ unsigned allow_filter_fallback : 1;
+ unsigned long tree_filter_max_depth;
+
+ unsigned done : 1; /* v2 only */
+ unsigned allow_ref_in_want : 1; /* v2 only */
+ unsigned allow_sideband_all : 1; /* v2 only */
+ unsigned advertise_sid : 1;
+};
+
+static void upload_pack_data_init(struct upload_pack_data *data)
+{
+ struct string_list symref = STRING_LIST_INIT_DUP;
+ struct string_list wanted_refs = STRING_LIST_INIT_DUP;
+ struct object_array want_obj = OBJECT_ARRAY_INIT;
+ struct object_array have_obj = OBJECT_ARRAY_INIT;
+ struct oid_array haves = OID_ARRAY_INIT;
+ struct object_array shallows = OBJECT_ARRAY_INIT;
+ struct string_list deepen_not = STRING_LIST_INIT_DUP;
+ struct string_list uri_protocols = STRING_LIST_INIT_DUP;
+ struct object_array extra_edge_obj = OBJECT_ARRAY_INIT;
+ struct string_list allowed_filters = STRING_LIST_INIT_DUP;