aboutsummaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-01-21 16:16:28 -0800
committerJunio C Hamano <gitster@pobox.com>2026-01-21 16:16:28 -0800
commit214cbb7b1dc876c4d51442b59b7f850e47916fc5 (patch)
tree40d7354c6be39528ea02b1b8075ed243ded7087c /environment.c
parentc0b4d2097998292299749d79c8b3c51322927253 (diff)
parent4eb105c11970747e8b78bd0275ff9ae431d58d1d (diff)
downloadgit-214cbb7b1dc876c4d51442b59b7f850e47916fc5.tar.xz
Merge branch 'rs/tree-wo-the-repository'
Remove implicit reliance on the_repository global in the APIs around tree objects and make it explicit which repository to work in. * rs/tree-wo-the-repository: cocci: remove obsolete the_repository rules cocci: convert parse_tree functions to repo_ variants tree: stop using the_repository tree: use repo_parse_tree() path-walk: use repo_parse_tree_gently() pack-bitmap-write: use repo_parse_tree() delta-islands: use repo_parse_tree() bloom: use repo_parse_tree() add-interactive: use repo_parse_tree_indirect() tree: add repo_parse_tree*() environment: move access to core.maxTreeDepth into repo settings
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/environment.c b/environment.c
index b65b85a01f..8ffbf92d50 100644
--- a/environment.c
+++ b/environment.c
@@ -80,30 +80,6 @@ int core_sparse_checkout_cone;
int sparse_expect_files_outside_of_patterns;
int precomposed_unicode = -1; /* see probe_utf8_pathname_composition() */
unsigned long pack_size_limit_cfg;
-int max_allowed_tree_depth =
-#ifdef _MSC_VER
- /*
- * When traversing into too-deep trees, Visual C-compiled Git seems to
- * run into some internal stack overflow detection in the
- * `RtlpAllocateHeap()` function that is called from within
- * `git_inflate_init()`'s call tree. The following value seems to be
- * low enough to avoid that by letting Git exit with an error before
- * the stack overflow can occur.
- */
- 512;
-#elif defined(GIT_WINDOWS_NATIVE) && defined(__clang__) && defined(__aarch64__)
- /*
- * Similar to Visual C, it seems that on Windows/ARM64 the clang-based
- * builds have a smaller stack space available. When running out of
- * that stack space, a `STATUS_STACK_OVERFLOW` is produced. When the
- * Git command was run from an MSYS2 Bash, this unfortunately results
- * in an exit code 127. Let's prevent that by lowering the maximal
- * tree depth; This value seems to be low enough.
- */
- 1280;
-#else
- 2048;
-#endif
#ifndef PROTECT_HFS_DEFAULT
#define PROTECT_HFS_DEFAULT 0
@@ -569,11 +545,6 @@ int git_default_core_config(const char *var, const char *value,
return 0;
}
- if (!strcmp(var, "core.maxtreedepth")) {
- max_allowed_tree_depth = git_config_int(var, value, ctx->kvi);
- return 0;
- }
-
/* Add other config variables here and to Documentation/config.adoc. */
return platform_core_config(var, value, ctx, cb);
}