@@ -46,8 +46,7 @@ static timestamp_t oldest_have;
static int multi_ack;
static int no_done;
-static int use_thin_pack, use_ofs_delta, use_include_tag;
-static int no_progress, daemon_mode;
+static int daemon_mode;
/* Allow specifying sha1 if it is a ref tip. */
#define ALLOW_TIP_SHA1 01
/* Allow request of a sha1 if it is reachable from a ref (possibly hidden ref). */
@@ -186,17 +185,17 @@ static void create_pack_file(struct upload_pack_data *pack_data)
}
argv_array_push(&pack_objects.args, "pack-objects");
argv_array_push(&pack_objects.args, "--revs");
- if (use_thin_pack)
+ if (pack_data->use_thin_pack)
argv_array_push(&pack_objects.args, "--thin");
argv_array_push(&pack_objects.args, "--stdout");
if (shallow_nr)
argv_array_push(&pack_objects.args, "--shallow");
- if (!no_progress)
+ if (!pack_data->no_progress)
argv_array_push(&pack_objects.args, "--progress");
- if (use_ofs_delta)
+ if (pack_data->use_ofs_delta)
argv_array_push(&pack_objects.args, "--delta-base-offset");
- if (use_include_tag)
+ if (pack_data->use_include_tag)
argv_array_push(&pack_objects.args, "--include-tag");
if (pack_data->filter_options.choice) {
const char *spec =
@@ -955,17 +954,17 @@ static void receive_needs(struct upload_pack_data *data,
if (parse_feature_request(features, "no-done"))
no_done = 1;
if (parse_feature_request(features, "thin-pack"))
- use_thin_pack = 1;
+ data->use_thin_pack = 1;
if (parse_feature_request(features, "ofs-delta"))
- use_ofs_delta = 1;
+ data->use_ofs_delta = 1;
if (parse_feature_request(features, "side-band-64k"))
use_sideband = LARGE_PACKET_MAX;
else if (parse_feature_request(features, "side-band"))
use_sideband = DEFAULT_PACKET_MAX;
if (parse_feature_request(features, "no-progress"))
- no_progress = 1;
+ data->no_progress = 1;
if (parse_feature_request(features, "include-tag"))
- use_include_tag = 1;
+ data->use_include_tag = 1;
if (allow_filter && parse_feature_request(features, "filter"))
filter_capability_requested = 1;
@@ -997,7 +996,7 @@ static void receive_needs(struct upload_pack_data *data,
check_non_tip(data);
if (!use_sideband && daemon_mode)
- no_progress = 1;
+ data->no_progress = 1;
if (data->depth == 0 && !data->deepen_rev_list && data->shallows.nr == 0)
return;
@@ -1279,19 +1278,19 @@ static void process_args(struct packet_reader *request,
/* process args like thin-pack */
if (!strcmp(arg, "thin-pack")) {
- use_thin_pack = 1;
+ data->use_thin_pack = 1;
continue;
}
if (!strcmp(arg, "ofs-delta")) {
- use_ofs_delta = 1;
+ data->use_ofs_delta = 1;
continue;
}
if (!strcmp(arg, "no-progress")) {
- no_progress = 1;
+ data->no_progress = 1;
continue;
}
if (!strcmp(arg, "include-tag")) {
- use_include_tag = 1;
+ data->use_include_tag = 1;
continue;
}
if (!strcmp(arg, "done")) {