Skip to content

Commit 8a0e6f1

Browse files
chriscoolgitster
authored andcommitted
upload-pack: pass upload_pack_data to upload_pack_config()
As we cleanup 'upload-pack.c' by using 'struct upload_pack_data' more thoroughly, let's pass that struct to upload_pack_config(), so that this function can use all the fields of the struct. This will be used in followup commits to move static variables that are set in upload_pack_config() into 'upload_pack_data'. Signed-off-by: Christian Couder <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e9d882b commit 8a0e6f1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

upload-pack.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ static int find_symref(const char *refname, const struct object_id *oid,
11131113
return 0;
11141114
}
11151115

1116-
static int upload_pack_config(const char *var, const char *value, void *unused)
1116+
static int upload_pack_config(const char *var, const char *value, void *cb_data)
11171117
{
11181118
if (!strcmp("uploadpack.allowtipsha1inwant", var)) {
11191119
if (git_config_bool(var, value))
@@ -1158,10 +1158,10 @@ void upload_pack(struct upload_pack_options *options)
11581158
struct packet_reader reader;
11591159
struct upload_pack_data data;
11601160

1161-
git_config(upload_pack_config, NULL);
1162-
11631161
upload_pack_data_init(&data);
11641162

1163+
git_config(upload_pack_config, &data);
1164+
11651165
data.stateless_rpc = options->stateless_rpc;
11661166
data.daemon_mode = options->daemon_mode;
11671167
data.timeout = options->timeout;
@@ -1491,11 +1491,11 @@ int upload_pack_v2(struct repository *r, struct argv_array *keys,
14911491

14921492
clear_object_flags(ALL_FLAGS);
14931493

1494-
git_config(upload_pack_config, NULL);
1495-
14961494
upload_pack_data_init(&data);
14971495
data.use_sideband = LARGE_PACKET_MAX;
14981496

1497+
git_config(upload_pack_config, &data);
1498+
14991499
while (state != FETCH_DONE) {
15001500
switch (state) {
15011501
case FETCH_PROCESS_ARGS:

0 commit comments

Comments
 (0)