diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-07-06 21:54:48 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-06 21:54:48 +0300 |
commit | b3d1c85d4833aef546f11e4d37516a1ececaefc3 (patch) | |
tree | b5e799c3279f98f5172ce18cfd0e9b317e9822dd /builtin/receive-pack.c | |
parent | 1d76e69212102c3373b552186590b76d6ad8d84c (diff) | |
parent | 6e8e7981eb86e2c19401825dbdb55d5860d11313 (diff) |
Merge branch 'gc/config-context'
Reduce reliance on a global state in the config reading API.
* gc/config-context:
config: pass source to config_parser_event_fn_t
config: add kvi.path, use it to evaluate includes
config.c: remove config_reader from configsets
config: pass kvi to die_bad_number()
trace2: plumb config kvi
config.c: pass ctx with CLI config
config: pass ctx with config files
config.c: pass ctx in configsets
config: add ctx arg to config_fn_t
urlmatch.h: use config_fn_t type
config: inline git_color_default_config
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r-- | builtin/receive-pack.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 91caaf8706..faa8f84c5a 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -140,7 +140,8 @@ static enum deny_action parse_deny_action(const char *var, const char *value) return DENY_IGNORE; } -static int receive_pack_config(const char *var, const char *value, void *cb) +static int receive_pack_config(const char *var, const char *value, + const struct config_context *ctx, void *cb) { int status = parse_hide_refs_config(var, value, "receive", &hidden_refs); @@ -158,12 +159,12 @@ static int receive_pack_config(const char *var, const char *value, void *cb) } if (strcmp(var, "receive.unpacklimit") == 0) { - receive_unpack_limit = git_config_int(var, value); + receive_unpack_limit = git_config_int(var, value, ctx->kvi); return 0; } if (strcmp(var, "transfer.unpacklimit") == 0) { - transfer_unpack_limit = git_config_int(var, value); + transfer_unpack_limit = git_config_int(var, value, ctx->kvi); return 0; } @@ -231,7 +232,7 @@ static int receive_pack_config(const char *var, const char *value, void *cb) return git_config_string(&cert_nonce_seed, var, value); if (strcmp(var, "receive.certnonceslop") == 0) { - nonce_stamp_slop_limit = git_config_ulong(var, value); + nonce_stamp_slop_limit = git_config_ulong(var, value, ctx->kvi); return 0; } @@ -246,12 +247,12 @@ static int receive_pack_config(const char *var, const char *value, void *cb) } if (strcmp(var, "receive.keepalive") == 0) { - keepalive_in_sec = git_config_int(var, value); + keepalive_in_sec = git_config_int(var, value, ctx->kvi); return 0; } if (strcmp(var, "receive.maxinputsize") == 0) { - max_input_size = git_config_int64(var, value); + max_input_size = git_config_int64(var, value, ctx->kvi); return 0; } @@ -267,7 +268,7 @@ static int receive_pack_config(const char *var, const char *value, void *cb) return 0; } - return git_default_config(var, value, cb); + return git_default_config(var, value, ctx, cb); } static void show_ref(const char *path, const struct object_id *oid) |