From e691395365b871608551bfbe20982b53140a50f0 Mon Sep 17 00:00:00 2001 From: René Scharfe Date: Fri, 9 Jan 2026 22:30:12 +0100 Subject: environment: move access to core.maxTreeDepth into repo settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The config setting core.maxTreeDepth is stored in a global variable and populated by the function git_default_core_config. This won't work if we need to access multiple repositories with different values of that setting in the same process. Store the setting in struct repo_settings instead and track it separately for each repository. Signed-off-by: René Scharfe Signed-off-by: Junio C Hamano --- list-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'list-objects.c') diff --git a/list-objects.c b/list-objects.c index 42c17d9573..1279676ddc 100644 --- a/list-objects.c +++ b/list-objects.c @@ -167,7 +167,7 @@ static void process_tree(struct traversal_context *ctx, !revs->include_check_obj(&tree->object, revs->include_check_data)) return; - if (ctx->depth > max_allowed_tree_depth) + if (ctx->depth > revs->repo->settings.max_allowed_tree_depth) die("exceeded maximum allowed tree depth"); failed_parse = parse_tree_gently(tree, 1); -- cgit v1.3