upload-pack: remove unused 'wants' from upload_pack_data

As we cleanup 'upload-pack.c' by using 'struct upload_pack_data'
more thoroughly, let's remove 'struct object_array wants' from
'struct upload_pack_data', as it appears to be unused.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Christian Couder
2020-05-15 12:04:42 +02:00
committed by Junio C Hamano
parent efcab5b7a3
commit 06c7a43296

View File

@@ -1131,7 +1131,6 @@ void upload_pack(struct upload_pack_options *options)
}
struct upload_pack_data {
struct object_array wants;
struct string_list wanted_refs;
struct oid_array haves;
@@ -1157,14 +1156,12 @@ struct upload_pack_data {
static void upload_pack_data_init(struct upload_pack_data *data)
{
struct object_array wants = OBJECT_ARRAY_INIT;
struct string_list wanted_refs = STRING_LIST_INIT_DUP;
struct oid_array haves = OID_ARRAY_INIT;
struct object_array shallows = OBJECT_ARRAY_INIT;
struct string_list deepen_not = STRING_LIST_INIT_DUP;
memset(data, 0, sizeof(*data));
data->wants = wants;
data->wanted_refs = wanted_refs;
data->haves = haves;
data->shallows = shallows;
@@ -1174,7 +1171,6 @@ static void upload_pack_data_init(struct upload_pack_data *data)
static void upload_pack_data_clear(struct upload_pack_data *data)
{
object_array_clear(&data->wants);
string_list_clear(&data->wanted_refs, 1);
oid_array_clear(&data->haves);
object_array_clear(&data->shallows);