@matheusbsbs / matheus-bagliano / commits / e9831e83e0
Fork 0

git-gc --auto: add documentation.

This documents the auto-packing of loose objects performed by git-gc --auto. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Sep 17, 2007 at 00:39 UTC e9831e83e063844b90cf9e525d0003715dd8b395
2 files changed +17 -1
Documentation/config.txt
+7
@@ -439,6 +439,13 @@ gc.aggressiveWindow::
439 algorithm used by 'git gc --aggressive'. This defaults
440 to 10.
441
442 +gc.auto::
443 + When there are approximately more than this many loose
444 + objects in the repository, `git gc --auto` will pack them.
445 + Some Porcelain commands use this command to perform a
446 + light-weight garbage collection from time to time. Setting
447 + this to 0 disables it.
448 +
449 gc.packrefs::
450 `git gc` does not run `git pack-refs` in a bare repository by
451 default so that older dumb-transport clients can still fetch
Documentation/git-gc.txt
+10 -1
@@ -8,7 +8,7 @@ git-gc - Cleanup unnecessary files and optimize the local repository
8
9 SYNOPSIS
10 --------
11 -'git-gc' [--prune] [--aggressive]
11 +'git-gc' [--prune] [--aggressive] [--auto]
12
13 DESCRIPTION
14 -----------
@@ -43,6 +43,15 @@ OPTIONS
43 persistent, so this option only needs to be used occasionally; every
44 few hundred changesets or so.
45
46 +--auto::
47 + With this option, `git gc` checks if there are too many
48 + loose objects in the repository and runs
49 + gitlink:git-repack[1] with `-d -l` option to pack them.
50 + The threshold is set with `gc.auto` configuration
51 + variable, and can be disabled by setting it to 0. Some
52 + Porcelain commands use this after they perform operation
53 + that could create many loose objects automatically.
54 +
55 Configuration
56 -------------
57