core doc: modernize core.bigFileThreshold documentation

The core.bigFileThreshold documentation has been largely unchanged since 5eef828bc03 (fast-import: Stream very large blobs directly to pack, 2010-02-01). But since then this setting has been expanded to affect a lot more than that description indicated. Most notably in how "git diff" treats them, see 6bf3b813486 (diff --stat: mark any file larger than core.bigfilethreshold binary, 2014-08-16). In addition to that, numerous commands and APIs make use of a streaming mode for files above this threshold. So let's attempt to summarize 12 years of changes in behavior, which can be seen with: git log --oneline -Gbig_file_thre 5eef828bc03.. -- '*.c' To do that turn this into a bullet-point list. The summary Han Xin produced in [1] helped a lot, but is a bit too detailed for documentation aimed at users. Let's instead summarize how user-observable behavior differs, and generally describe how we tend to stream these files in various commands. 1. https://lore.kernel.org/git/20220120112114.47618-5-chiyutianyi@gmail.com/ Helped-by: Han Xin <chiyutianyi@gmail.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Jun 11, 2022 at 10:44 UTC 3c3ca0b0c193e4f2cdf281b5e20ddb75c555f8e6
1 file changed +24 -9
Documentation/config/core.txt
+24 -9
@@ -444,17 +444,32 @@ You probably do not need to adjust this value.
444 Common unit suffixes of 'k', 'm', or 'g' are supported.
445
446 core.bigFileThreshold::
447 - Files larger than this size are stored deflated, without
448 - attempting delta compression. Storing large files without
449 - delta compression avoids excessive memory usage, at the
450 - slight expense of increased disk usage. Additionally files
451 - larger than this size are always treated as binary.
447 + The size of files considered "big", which as discussed below
448 + changes the behavior of numerous git commands, as well as how
449 + such files are stored within the repository. The default is
450 + 512 MiB. Common unit suffixes of 'k', 'm', or 'g' are
451 + supported.
452 +
453 -Default is 512 MiB on all platforms. This should be reasonable
454 -for most projects as source code and other text files can still
455 -be delta compressed, but larger binary media files won't be.
453 +Files above the configured limit will be:
454 +
457 -Common unit suffixes of 'k', 'm', or 'g' are supported.
455 +* Stored deflated in packfiles, without attempting delta compression.
456 ++
457 +The default limit is primarily set with this use-case in mind. With it,
458 +most projects will have their source code and other text files delta
459 +compressed, but not larger binary media files.
460 ++
461 +Storing large files without delta compression avoids excessive memory
462 +usage, at the slight expense of increased disk usage.
463 ++
464 +* Will be treated as if they were labeled "binary" (see
465 + linkgit:gitattributes[5]). e.g. linkgit:git-log[1] and
466 + linkgit:git-diff[1] will not compute diffs for files above this limit.
467 ++
468 +* Will generally be streamed when written, which avoids excessive
469 +memory usage, at the cost of some fixed overhead. Commands that make
470 +use of this include linkgit:git-archive[1],
471 +linkgit:git-fast-import[1], linkgit:git-index-pack[1] and
472 +linkgit:git-fsck[1].
473
474 core.excludesFile::
475 Specifies the pathname to the file that contains patterns to