Skip to content

Commit 738820a

Browse files
bebarinogitster
authored andcommitted
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 <[email protected]>. Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cc1b8d8 commit 738820a

File tree

5 files changed

+36
-28
lines changed

5 files changed

+36
-28
lines changed

Documentation/git-fetch-pack.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ OPTIONS
4444
locked against repacking.
4545

4646
--thin::
47-
Spend extra cycles to minimize the number of objects to be sent.
48-
Use it on slower connection.
47+
Fetch a "thin" pack, which records objects in deltified form based
48+
on objects not included in the pack to reduce network traffic.
4949

5050
--include-tag::
5151
If the remote side supports it, annotated tags objects will

Documentation/git-index-pack.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,10 @@ OPTIONS
4646
'git repack'.
4747

4848
--fix-thin::
49-
It is possible for 'git pack-objects' to build
50-
"thin" pack, which records objects in deltified form based on
51-
objects not included in the pack to reduce network traffic.
52-
Those objects are expected to be present on the receiving end
53-
and they must be included in the pack for that pack to be self
54-
contained and indexable. Without this option any attempt to
55-
index a thin pack will fail. This option only makes sense in
56-
conjunction with --stdin.
49+
Fix a "thin" pack produced by `git pack-objects --thin` (see
50+
linkgit:git-pack-objects[1] for details) by adding the
51+
excluded objects the deltified objects are based on to the
52+
pack. This option only makes sense in conjunction with --stdin.
5753

5854
--keep::
5955
Before moving the index into its final destination

Documentation/git-pack-objects.txt

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,28 @@ DESCRIPTION
2121
Reads list of objects from the standard input, and writes a packed
2222
archive with specified base-name, or to the standard output.
2323

24-
A packed archive is an efficient way to transfer set of objects
25-
between two repositories, and also is an archival format which
26-
is efficient to access. The packed archive format (.pack) is
27-
designed to be self contained so that it can be unpacked without
28-
any further information, but for fast, random access to the objects
29-
in the pack, a pack index file (.idx) will be generated.
30-
31-
Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or
24+
A packed archive is an efficient way to transfer a set of objects
25+
between two repositories as well as an access efficient archival
26+
format. In a packed archive, an object is either stored as a
27+
compressed whole or as a difference from some other object.
28+
The latter is often called a delta.
29+
30+
The packed archive format (.pack) is designed to be self-contained
31+
so that it can be unpacked without any further information. Therefore,
32+
each object that a delta depends upon must be present within the pack.
33+
34+
A pack index file (.idx) is generated for fast, random access to the
35+
objects in the pack. Placing both the index file (.idx) and the packed
36+
archive (.pack) in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or
3237
any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES)
33-
enables git to read from such an archive.
38+
enables git to read from the pack archive.
3439

3540
The 'git unpack-objects' command can read the packed archive and
3641
expand the objects contained in the pack into "one-file
3742
one-object" format; this is typically done by the smart-pull
3843
commands when a pack is created on-the-fly for efficient network
3944
transport by their peers.
4045

41-
In a packed archive, an object is either stored as a compressed
42-
whole, or as a difference from some other object. The latter is
43-
often called a delta.
44-
4546

4647
OPTIONS
4748
-------
@@ -179,6 +180,16 @@ base-name::
179180
Add --no-reuse-object if you want to force a uniform compression
180181
level on all data no matter the source.
181182

183+
--thin::
184+
Create a "thin" pack by omitting the common objects between a
185+
sender and a receiver in order to reduce network transfer. This
186+
option only makes sense in conjunction with --stdout.
187+
+
188+
Note: A thin pack violates the packed archive format by omitting
189+
required objects and is thus unusable by git without making it
190+
self-contained. Use `git index-pack --fix-thin`
191+
(see linkgit:git-index-pack[1]) to restore the self-contained property.
192+
182193
--delta-base-offset::
183194
A packed archive can express base object of a delta as
184195
either 20-byte object name or as an offset in the

Documentation/git-push.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ useful if you write an alias or script around 'git push'.
141141

142142
--thin::
143143
--no-thin::
144-
These options are passed to 'git send-pack'. Thin
145-
transfer spends extra cycles to minimize the number of
146-
objects to be sent and meant to be used on slower connection.
144+
These options are passed to linkgit:git-send-pack[1]. A thin transfer
145+
significantly reduces the amount of sent data when the sender and
146+
receiver share many of the same objects in common. The default is
147+
\--thin.
147148

148149
-v::
149150
--verbose::

Documentation/git-send-pack.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ OPTIONS
4848
Run verbosely.
4949

5050
--thin::
51-
Spend extra cycles to minimize the number of objects to be sent.
52-
Use it on slower connection.
51+
Send a "thin" pack, which records objects in deltified form based
52+
on objects not included in the pack to reduce network traffic.
5353

5454
<host>::
5555
A remote host to house the repository. When this

0 commit comments

Comments
 (0)