@matheusbsbs / matheus-bagliano / commits / 06c7a43296
Fork 0

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>

Christian Couder committed May 15, 2020 at 12:04 UTC 06c7a4329633b1b21645993288c13bb888627521
1 file changed -4
upload-pack.c
-4
@@ -1131,7 +1131,6 @@ void upload_pack(struct upload_pack_options *options)
1131 }
1132
1133 struct upload_pack_data {
1134 - struct object_array wants;
1134 struct string_list wanted_refs;
1135 struct oid_array haves;
1136
@@ -1157,14 +1156,12 @@ struct upload_pack_data {
1156
1157 static void upload_pack_data_init(struct upload_pack_data *data)
1158 {
1160 - struct object_array wants = OBJECT_ARRAY_INIT;
1159 struct string_list wanted_refs = STRING_LIST_INIT_DUP;
1160 struct oid_array haves = OID_ARRAY_INIT;
1161 struct object_array shallows = OBJECT_ARRAY_INIT;
1162 struct string_list deepen_not = STRING_LIST_INIT_DUP;
1163
1164 memset(data, 0, sizeof(*data));
1167 - data->wants = wants;
1165 data->wanted_refs = wanted_refs;
1166 data->haves = haves;
1167 data->shallows = shallows;
@@ -1174,7 +1171,6 @@ static void upload_pack_data_init(struct upload_pack_data *data)
1171
1172 static void upload_pack_data_clear(struct upload_pack_data *data)
1173 {
1177 - object_array_clear(&data->wants);
1174 string_list_clear(&data->wanted_refs, 1);
1175 oid_array_clear(&data->haves);
1176 object_array_clear(&data->shallows);