From 4f366275189c06ec26c01ee5ace2f3831b2aa46a Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Mon, 23 Nov 2009 12:43:50 -0500 Subject: pack-objects: split implications of --all-progress from progress activation Currently the --all-progress flag is used to use force progress display during the writing object phase even if output goes to stdout which is primarily the case during a push operation. This has the unfortunate side effect of forcing progress display even if stderr is not a terminal. Let's introduce the --all-progress-implied argument which has the same intent except for actually forcing the activation of any progress display. With this, progress display will be automatically inhibited whenever stderr is not a terminal, or full progress display will be included otherwise. This should let people use 'git push' within a cron job without filling their logs with useless percentage displays. Signed-off-by: Nicolas Pitre Tested-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/git-pack-objects.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Documentation/git-pack-objects.txt') diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index 2e4992970e..f54d433d36 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -9,8 +9,9 @@ git-pack-objects - Create a packed archive of objects SYNOPSIS -------- [verse] -'git pack-objects' [-q] [--no-reuse-delta] [--delta-base-offset] [--non-empty] - [--local] [--incremental] [--window=N] [--depth=N] [--all-progress] +'git pack-objects' [-q | --progress | --all-progress] [--all-progress-implied] + [--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 @@ -137,7 +138,7 @@ base-name:: --all-progress:: When --stdout is specified then progress report is - displayed during the object count and deltification phases + displayed during the object count and compression phases but inhibited during the write-out phase. The reason is that in some cases the output stream is directly linked to another command which may wish to display progress @@ -146,6 +147,11 @@ base-name:: report for the write-out phase as well even if --stdout is used. +--all-progress-implied:: + This is used to imply --all-progress whenever progress display + is activated. Unlike --all-progress this flag doesn't actually + force any progress display by itself. + -q:: This flag makes the command not to report its progress on the standard error stream. -- cgit v1.2.1 From 0b444cdb19bcfcc7f59b7b00783cbfbbc5ddcf63 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Sun, 10 Jan 2010 00:33:00 +0100 Subject: Documentation: spell 'git cmd' without dash throughout The documentation was quite inconsistent when spelling 'git cmd' if it only refers to the program, not to some specific invocation syntax: both 'git-cmd' and 'git cmd' spellings exist. The current trend goes towards dashless forms, and there is precedent in 647ac70 (git-svn.txt: stop using dash-form of commands., 2009-07-07) to actively eliminate the dashed variants. Replace 'git-cmd' with 'git cmd' throughout, except where git-shell, git-cvsserver, git-upload-pack, git-receive-pack, and git-upload-archive are concerned, because those really live in the $PATH. --- Documentation/git-pack-objects.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation/git-pack-objects.txt') diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index f54d433d36..097a14773b 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -32,7 +32,7 @@ Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES) enables git to read from such an archive. -The 'git-unpack-objects' command can read the packed archive and +The 'git unpack-objects' command can read the packed archive and expand the objects contained in the pack into "one-file one-object" format; this is typically done by the smart-pull commands when a pack is created on-the-fly for efficient network @@ -61,7 +61,7 @@ base-name:: --revs:: Read the revision arguments from the standard input, instead of individual object names. The revision arguments are processed - the same way as 'git-rev-list' with the `--objects` flag + the same way as 'git rev-list' with the `--objects` flag uses its `commit` arguments to build the list of objects it outputs. The objects on the resulting list are packed. @@ -182,7 +182,7 @@ base-name:: A packed archive can express base object of a delta as either 20-byte object name or as an offset in the stream, but older version of git does not understand the - latter. By default, 'git-pack-objects' only uses the + latter. By default, 'git pack-objects' only uses the former format for better compatibility. This option allows the command to use the latter format for compactness. Depending on the average delta chain -- cgit v1.2.1 From 07cf0f2407709e3764ea989696b513ec32613504 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Wed, 3 Feb 2010 22:48:28 -0500 Subject: make --max-pack-size argument to 'git pack-object' count in bytes The value passed to --max-pack-size used to count in MiB which was inconsistent with the corresponding configuration variable as well as other command arguments which are defined to count in bytes with an optional unit suffix. This brings --max-pack-size in line with the rest of Git. Also, in order not to cause havoc with people used to the previous megabyte scale, and because this is a sane thing to do anyway, a minimum size of 1 MiB is enforced to avoid an explosion of pack files. Adjust and extend test suite accordingly. Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- Documentation/git-pack-objects.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Documentation/git-pack-objects.txt') diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index 097a14773b..ffd5025f7b 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -105,8 +105,9 @@ base-name:: `--window-memory=0` makes memory usage unlimited, which is the default. ---max-pack-size=:: - Maximum size of each output packfile, expressed in MiB. +--max-pack-size=[N]:: + Maximum size of each output pack file. The size can be suffixed with + "k", "m", or "g". The minimum size allowed is limited to 1 MiB. If specified, multiple packfiles may be created. The default is unlimited, unless the config variable `pack.packSizeLimit` is set. -- cgit v1.2.1 From cc1b8d8bc6e453b96798574d67ce9590eb3e82e1 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 17 Feb 2010 20:16:20 -0500 Subject: docs: don't talk about $GIT_DIR/refs/ everywhere It is misleading to say that we pull refs from $GIT_DIR/refs/*, because we may also consult the packed refs mechanism. These days we tend to treat the "refs hierarchy" as more of an abstract namespace that happens to be represented as $GIT_DIR/refs. At best, this is a minor inaccuracy, but at worst it can confuse users who then look in $GIT_DIR/refs and find that it is missing some of the refs they expected to see. This patch drops most uses of "$GIT_DIR/refs/*", changing them into just "refs/*", under the assumption that users can handle the concept of an abstract refs namespace. There are a few things to note: - most cases just dropped the $GIT_DIR/ portion. But for cases where that left _just_ the word "refs", I changed it to "refs/" to help indicate that it was a hierarchy. I didn't do the same for longer paths (e.g., "refs/heads" remained, instead of becoming "refs/heads/"). - in some cases, no change was made, as the text was explicitly about unpacked refs (e.g., the discussion in git-pack-refs). - In some cases it made sense instead to note the existence of packed refs (e.g., in check-ref-format and rev-parse). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/git-pack-objects.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-pack-objects.txt') diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index ffd5025f7b..61fd7d0998 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -73,7 +73,7 @@ base-name:: --all:: This implies `--revs`. In addition to the list of revision arguments read from the standard input, pretend - as if all refs under `$GIT_DIR/refs` are specified to be + as if all refs under `refs/` are specified to be included. --include-tag:: -- cgit v1.2.1 From 738820a913d05427b6c86d227aafd2bac7cd38d1 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Thu, 18 Feb 2010 01:10:28 -0800 Subject: Documentation: describe --thin more accurately The description for --thin was misleading and downright wrong. Correct it with some inspiration from the description of index-pack's --fix-thin and some background information from Nicolas Pitre . Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- Documentation/git-pack-objects.txt | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'Documentation/git-pack-objects.txt') diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index 61fd7d0998..034caedc39 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -21,16 +21,21 @@ DESCRIPTION Reads list of objects from the standard input, and writes a packed archive with specified base-name, or to the standard output. -A packed archive is an efficient way to transfer set of objects -between two repositories, and also is an archival format which -is efficient to access. The packed archive format (.pack) is -designed to be self contained so that it can be unpacked without -any further information, but for fast, random access to the objects -in the pack, a pack index file (.idx) will be generated. - -Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or +A packed archive is an efficient way to transfer a set of objects +between two repositories as well as an access efficient archival +format. In a packed archive, an object is either stored as a +compressed whole or as a difference from some other object. +The latter is often called a delta. + +The packed archive format (.pack) is designed to be self-contained +so that it can be unpacked without any further information. Therefore, +each object that a delta depends upon must be present within the pack. + +A pack index file (.idx) is generated for fast, random access to the +objects in the pack. Placing both the index file (.idx) and the packed +archive (.pack) in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES) -enables git to read from such an archive. +enables git to read from the pack archive. The 'git unpack-objects' command can read the packed archive and expand the objects contained in the pack into "one-file @@ -38,10 +43,6 @@ one-object" format; this is typically done by the smart-pull commands when a pack is created on-the-fly for efficient network transport by their peers. -In a packed archive, an object is either stored as a compressed -whole, or as a difference from some other object. The latter is -often called a delta. - OPTIONS ------- @@ -179,6 +180,16 @@ base-name:: Add --no-reuse-object if you want to force a uniform compression level on all data no matter the source. +--thin:: + Create a "thin" pack by omitting the common objects between a + sender and a receiver in order to reduce network transfer. This + option only makes sense in conjunction with --stdout. ++ +Note: A thin pack violates the packed archive format by omitting +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. + --delta-base-offset:: A packed archive can express base object of a delta as either 20-byte object name or as an offset in the -- cgit v1.2.1 From 21da42621489df7824f1fce7180702a9aa540707 Mon Sep 17 00:00:00 2001 From: Nelson Elhage Date: Thu, 18 Feb 2010 22:29:30 -0500 Subject: Documentation: pack-objects: Clarify --local's semantics. The current documentation suggests that --local also ignores any objects in local packs, which is incorrect. Change the language to be clearer and more parallel to the other options that ignore objects. While we're at it, fix a trivial error in --incremental's documentation. Signed-off-by: Nelson Elhage Signed-off-by: Junio C Hamano --- Documentation/git-pack-objects.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Documentation/git-pack-objects.txt') diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index 034caedc39..769f1de6b6 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -119,14 +119,13 @@ base-name:: standard input. --incremental:: - This flag causes an object already in a pack ignored + This flag causes an object already in a pack to be ignored even if it appears in the standard input. --local:: - This flag is similar to `--incremental`; instead of - ignoring all packed objects, it only ignores objects - that are packed and/or not in the local object store - (i.e. borrowed from an alternate). + This flag causes an object that is borrowed from an alternate + object store to be ignored even if it appears in the standard + input. --non-empty:: Only create a packed archive if it would contain at -- cgit v1.2.1 From 3909f14f62fe81d65e62a2fe6b0e3a8c1661d422 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 24 Feb 2010 15:41:27 -0800 Subject: pack-objects documentation: reword "objects that appear in the standard input" These were written back when we always read objects from the standard input. These days --revs and its friends can feed only the start and end points and have the command internally enumerate the objects. Signed-off-by: Junio C Hamano --- Documentation/git-pack-objects.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation/git-pack-objects.txt') diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index 769f1de6b6..1deaa6501e 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -120,12 +120,12 @@ base-name:: --incremental:: This flag causes an object already in a pack to be ignored - even if it appears in the standard input. + even if it would have otherwise been packed. --local:: This flag causes an object that is borrowed from an alternate - object store to be ignored even if it appears in the standard - input. + object store to be ignored even if it would have otherwise been + packed. --non-empty:: Only create a packed archive if it would contain at -- cgit v1.2.1 From 18879bc52668123d75f0e03e27d5e731bf9b40ee Mon Sep 17 00:00:00 2001 From: Nelson Elhage Date: Wed, 24 Feb 2010 19:11:23 -0500 Subject: pack-objects documentation: Fix --honor-pack-keep as well. Signed-off-by: Nelson Elhage Signed-off-by: Junio C Hamano --- Documentation/git-pack-objects.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation/git-pack-objects.txt') diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index 1deaa6501e..8ed09c0b3c 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -115,8 +115,8 @@ base-name:: --honor-pack-keep:: This flag causes an object already in a local pack that - has a .keep file to be ignored, even if it appears in the - standard input. + has a .keep file to be ignored, even if it it would have + otherwise been packed. --incremental:: This flag causes an object already in a pack to be ignored -- cgit v1.2.1