[PATCH v2] doc: mention bigFileThreshold for packing
To
git@vger.kernel.org
Cc
Christian Walther
Christian Walther
From
Christian Walther via GitGitGadget
See Also
Prev
Date
2021-02-21 13:23:57 UTC
From: Christian Walther <cwalther@gmx.ch>

Knowing about the core.bigFileThreshold configuration variable is
helpful when examining pack file size differences between repositories.
Add a reference to it to the manpages a user is likely to read in this
situation.

Capitalize CONFIGURATION for consistency with other pages having such a
section.

Signed-off-by: Christian Walther <cwalther@gmx.ch>
---
    doc: mention bigFileThreshold for packing
    
    I recently spent a lot of time trying to figure out why git repack would
    create huge packs on some clones of my repository and small ones on
    others, until I found out about the existence of the
    core.bigFileThreshold configuration variable, which happened to be set
    on some and not on others. It would have saved me a lot of time if that
    variable had been mentioned in the relevant manpages that I was reading,
    git-repack and git-pack-objects. So this patch adds that.
    
    Changes in v2:
    
     * Move additions to the CONFIGURATION section at the bottom.
     * Reword a little after realizing that there are more configuration
       variables affecting packing.
     * Capitalize CONFIGURATION for consistency with other pages having such
       a section.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-872%2Fcwalther%2Fdeltadoc-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-872/cwalther/deltadoc-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/872

Range-diff vs v1:

 1:  20b9a56d94b7 < -:  ------------ doc: mention bigFileThreshold for packing
 -:  ------------ > 1:  027d1038fbb1 doc: mention bigFileThreshold for packing


 Documentation/git-pack-objects.txt | 11 +++++++++++
 Documentation/git-repack.txt       |  9 ++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index 54d715ead137..f85cb7ea934c 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -400,6 +400,17 @@ Note that we pick a single island for each regex to go into, using "last
 one wins" ordering (which allows repo-specific config to take precedence
 over user-wide config, and so forth).
 
+
+CONFIGURATION
+-------------
+
+Various configuration variables affect packing, see
+linkgit:git-config[1] (search for "pack" and "delta").
+
+Notably, delta compression is not used on objects larger than the
+`core.bigFileThreshold` configuration variable and on files with the
+attribute `delta` set to false.
+
 SEE ALSO
 --------
 linkgit:git-rev-list[1]
diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
index 92f146d27dc3..fbd4b4ae0677 100644
--- a/Documentation/git-repack.txt
+++ b/Documentation/git-repack.txt
@@ -165,9 +165,12 @@ depth is 4095.
 	Pass the `--delta-islands` option to `git-pack-objects`, see
 	linkgit:git-pack-objects[1].
 
-Configuration
+CONFIGURATION
 -------------
 
+Various configuration variables affect packing, see
+linkgit:git-config[1] (search for "pack" and "delta").
+
 By default, the command passes `--delta-base-offset` option to
 'git pack-objects'; this typically results in slightly smaller packs,
 but the generated packs are incompatible with versions of Git older than
@@ -178,6 +181,10 @@ need to set the configuration variable `repack.UseDeltaBaseOffset` to
 is unaffected by this option as the conversion is performed on the fly
 as needed in that case.
 
+Delta compression is not used on objects larger than the
+`core.bigFileThreshold` configuration variable and on files with the
+attribute `delta` set to false.
+
 SEE ALSO
 --------
 linkgit:git-pack-objects[1]

base-commit: 2283e0e9af55689215afa39c03beb2315ce18e83
-- 
gitgitgadget