]> git.ipfire.org Git - thirdparty/git.git/commitdiff
upload-pack: remove unused 'wants' from upload_pack_data
authorChristian Couder <christian.couder@gmail.com>
Fri, 15 May 2020 10:04:42 +0000 (12:04 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 May 2020 19:58:01 +0000 (12:58 -0700)
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>
upload-pack.c

index 0478bff3e7fd11fdf89463a1f23cd2371de1b220..9aaf886828db799e6bc95f473b0bb0ef79e82a54 100644 (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);