aboutsummaryrefslogtreecommitdiff
path: root/tree-diff.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 /tree-diff.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 'tree-diff.c')
-rw-r--r--tree-diff.c2
1 files changed, 1 insertions, 1 deletions
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);