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 --- tree-diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tree-diff.c') diff --git a/tree-diff.c b/tree-diff.c index 5988148b60..631ea86812 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -439,7 +439,7 @@ static void ll_diff_tree_paths( void *ttree, **tptree; int i; - if (depth > max_allowed_tree_depth) + if (depth > opt->repo->settings.max_allowed_tree_depth) die("exceeded maximum allowed tree depth"); FAST_ARRAY_ALLOC(tp, nparent); -- cgit v1.3