aboutsummaryrefslogtreecommitdiff
path: root/list-objects.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2026-01-09 22:30:12 +0100
committerJunio C Hamano <gitster@pobox.com>2026-01-09 18:36:16 -0800
commite691395365b871608551bfbe20982b53140a50f0 (patch)
tree29d332eb774487b760a9cea3224e8265965d32ed /list-objects.c
parentd529f3a197364881746f558e5652f0236131eb86 (diff)
downloadgit-e691395365b871608551bfbe20982b53140a50f0.tar.xz
environment: move access to core.maxTreeDepth into repo settings
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 <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'list-objects.c')
-rw-r--r--list-objects.c2
1 files changed, 1 insertions, 1 deletions
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);