summaryrefslogtreecommitdiff
path: root/Documentation/git-fast-import.txt
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2019-04-07 19:52:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-08 08:01:09 (GMT)
commit73845048815bace98588df03ab76fa3e85fc0927 (patch)
tree59e01753c4f96ad6ebb4434cbfa9217f52384d28 /Documentation/git-fast-import.txt
parent22d4e3bd19bc81b3db6f372d850ad681333a7fb1 (diff)
downloadgit-73845048815bace98588df03ab76fa3e85fc0927.zip
git-73845048815bace98588df03ab76fa3e85fc0927.tar.gz
git-73845048815bace98588df03ab76fa3e85fc0927.tar.bz2
gc docs: note "gc --aggressive" in "fast-import"
Amend the "PACKFILE OPTIMIZATION" section in "fast-import" to explain that simply running "git gc --aggressive" after a "fast-import" should properly optimize the repository. This is simpler and more effective than the existing "repack" advice (which I'm keeping as it helps explain things) because it e.g. also packs the newly imported refs. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-fast-import.txt')
-rw-r--r--Documentation/git-fast-import.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index 43ab3b1..2248755 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -1396,6 +1396,13 @@ deltas are suboptimal (see above) then also adding the `-f` option
to force recomputation of all deltas can significantly reduce the
final packfile size (30-50% smaller can be quite typical).
+Instead of running `git repack` you can also run `git gc
+--aggressive`, which will also optimize other things after an import
+(e.g. pack loose refs). As noted in the "AGGRESSIVE" section in
+linkgit:git-gc[1] the `--aggressive` option will find new deltas with
+the `-f` option to linkgit:git-repack[1]. For the reasons elaborated
+on above using `--aggressive` after a fast-import is one of the few
+cases where it's known to be worthwhile.
MEMORY UTILIZATION
------------------