diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2014-12-24 23:05:40 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-29 09:58:25 -0800 |
commit | 2dacf26d0985521c0f30e535963a45257b63ea21 (patch) | |
tree | 8453e46f21fee7805fc7c59a3f365bceac8195ac /Documentation | |
parent | rev-list: add an option to mark fewer edges as uninteresting (diff) | |
download | tgif-2dacf26d0985521c0f30e535963a45257b63ea21.tar.xz |
pack-objects: use --objects-edge-aggressive for shallow repos
When fetching into or pushing from a shallow repository, we want to
aggressively mark edges as uninteresting, since this decreases the pack
size. However, aggressively marking edges can negatively affect
performance on large non-shallow repositories with lots of refs.
Teach pack-objects a --shallow option to indicate that we're pushing
from or fetching into a shallow repository. Use
--objects-edge-aggressive only for shallow repositories and otherwise
use --objects-edge, which performs better in the general case. Update
the callers to pass the --shallow option when they are dealing with a
shallow repository.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-pack-objects.txt | 7 | ||||
-rw-r--r-- | Documentation/rev-list-options.txt | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index d2d8f4792a..c2f76fb1ea 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -13,7 +13,7 @@ SYNOPSIS [--no-reuse-delta] [--delta-base-offset] [--non-empty] [--local] [--incremental] [--window=<n>] [--depth=<n>] [--revs [--unpacked | --all]] [--stdout | base-name] - [--keep-true-parents] < object-list + [--shallow] [--keep-true-parents] < object-list DESCRIPTION @@ -190,6 +190,11 @@ required objects and is thus unusable by Git without making it self-contained. Use `git index-pack --fix-thin` (see linkgit:git-index-pack[1]) to restore the self-contained property. +--shallow:: + Optimize a pack that will be provided to a client with a shallow + repository. This option, combined with \--thin, can result in a + smaller pack at the cost of speed. + --delta-base-offset:: A packed archive can express the base object of a delta as either a 20-byte object name or as an offset in the diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 8cb6f92e19..2984f407a9 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -659,7 +659,8 @@ These options are mostly targeted for packing of Git repositories. --objects-edge-aggressive:: Similar to `--objects-edge`, but it tries harder to find excluded - commits at the cost of increased time. + commits at the cost of increased time. This is used instead of + `--objects-edge` to build ``thin'' packs for shallow repositories. --unpacked:: Only useful with `--objects`; print the object IDs that are not |