{"thread":{"id":"61792","subject":"[PATCH] Documentation: fix default value for core.maxTreeDepth","startedAt":"2024-07-17T13:17:39Z","lastAt":"2024-07-17T13:17:39Z","messageCount":1,"participants":["Taylor Blau"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"498826","messageId":"57610d9ca635b6c76b9af5b3d3f346a9bc7621be.1721222249.git.me@ttaylorr.com","threadId":"61792","inReplyTo":null,"subject":"[PATCH] Documentation: fix default value for core.maxTreeDepth","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-07-17T13:17:31Z","receivedAt":"2024-07-17T13:17:39Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"When `core.maxTreeDepth` was originally introduced via be20128bfa (add\ncore.maxTreeDepth config, 2023-08-31), its default value was 4096.\n\nThere have since been a couple of updates to its default value that were\nnot reflected in the documentation for `core.maxTreeDepth`:\n\n  - 4d5693ba05 (lower core.maxTreeDepth default to 2048, 2023-08-31)\n  - b64d78ad02 (max_tree_depth: lower it for MSVC to avoid stack\n    overflows, 2023-11-01)\n\nCommit 4d5693ba05 lowers the default to 2048 for platforms with smaller\nstack sizes, and commit b64d78ad02 lowers the default even further when\nGit is compiled with MSVC.\n\nNeither of these changes were reflected in the documentation, which I\nnoticed while merging newer releases back into GitHub's private fork\n(which contained the original implementation of `core.maxTreeDepth`).\n\nUpdate the documentation to reflect what the platform-specific default\nvalues are.\n\nNoticed-by: Keith W. Campbell <keithc@ca.ibm.com>\nSigned-off-by: Taylor Blau <me@ttaylorr.com>\n---\n Documentation/config/core.txt | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/config/core.txt b/Documentation/config/core.txt\nindex 93d65e1dfd..60ca9f2b68 100644\n--- a/Documentation/config/core.txt\n+++ b/Documentation/config/core.txt\n@@ -756,4 +756,5 @@ core.maxTreeDepth::\n \tThe maximum depth Git is willing to recurse while traversing a\n \ttree (e.g., \"a/b/cde/f\" has a depth of 4). This is a fail-safe\n \tto allow Git to abort cleanly, and should not generally need to\n-\tbe adjusted. The default is 4096.\n+\tbe adjusted. When Git is compiled with MSVC, the default is 512.\n+\tOtherwise, the default is 2048.\n-- \n2.45.2.746.g06e570c0df\n"}]}