* otherwise maximum packet size (up to 65520 bytes).
*/
static int use_sideband;
-static int stateless_rpc;
static const char *pack_objects_hook;
static int filter_capability_requested;
packet_write_fmt(1, "ACK %s\n", last_hex);
return 0;
}
- if (stateless_rpc)
+ if (data->stateless_rpc)
exit(0);
got_common = 0;
got_other = 0;
* uploadpack.allowReachableSHA1InWant,
* non-tip requests can never happen.
*/
- if (!stateless_rpc && !(allow_unadvertised_object_request & ALLOW_REACHABLE_SHA1))
+ if (!data->stateless_rpc
+ && !(allow_unadvertised_object_request & ALLOW_REACHABLE_SHA1))
goto error;
if (!has_unreachable(&data->want_obj))
/* All the non-tip ones are ancestors of what we advertised */
" allow-tip-sha1-in-want" : "",
(allow_unadvertised_object_request & ALLOW_REACHABLE_SHA1) ?
" allow-reachable-sha1-in-want" : "",
- stateless_rpc ? " no-done" : "",
+ data->stateless_rpc ? " no-done" : "",
symref_info.buf,
allow_filter ? " filter" : "",
git_user_agent_sanitized());
struct packet_reader reader;
struct upload_pack_data data;
- stateless_rpc = options->stateless_rpc;
timeout = options->timeout;
daemon_mode = options->daemon_mode;
upload_pack_data_init(&data);
+ data.stateless_rpc = options->stateless_rpc;
+
head_ref_namespaced(find_symref, &data.symref);
- if (options->advertise_refs || !stateless_rpc) {
+ if (options->advertise_refs || !data.stateless_rpc) {
reset_timeout();
head_ref_namespaced(send_ref, &data);
for_each_namespaced_ref(send_ref, &data);