Skip to content

Commit 40cc537

Browse files
avargitster
authored andcommitted
docs: move pack format docs to man section 5
Continue the move of existing Documentation/technical/* protocol and file-format documentation into our main documentation space by moving the various documentation pertaining to the *.pack format and related files, and updating things that refer to it to link to the new location. By moving these we can properly link from the newly created gitformat-commit-graph do to a gitformat-chunk-format manpage we build by default. Creating a "gitformat-pack-bitmap" from "Documentation/technical/bitmap-format" might logically be part of this change, but it's left out for now due to a conflict with the in-flight ac/bitmap-lookup-table series. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 37c647f commit 40cc537

17 files changed

+131
-31
lines changed

Documentation/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ MAN1_TXT += gitweb.txt
2525
# man5 / man7 guides (note: new guides should also be added to command-list.txt)
2626
MAN5_TXT += gitattributes.txt
2727
MAN5_TXT += gitformat-bundle.txt
28+
MAN5_TXT += gitformat-chunk.txt
2829
MAN5_TXT += gitformat-commit-graph.txt
30+
MAN5_TXT += gitformat-index.txt
31+
MAN5_TXT += gitformat-pack-cruft.txt
32+
MAN5_TXT += gitformat-pack.txt
33+
MAN5_TXT += gitformat-signature.txt
2934
MAN5_TXT += githooks.txt
3035
MAN5_TXT += gitignore.txt
3136
MAN5_TXT += gitmailmap.txt
@@ -101,21 +106,17 @@ TECH_DOCS += MyFirstObjectWalk
101106
TECH_DOCS += SubmittingPatches
102107
TECH_DOCS += ToolsForGit
103108
TECH_DOCS += technical/bitmap-format
104-
TECH_DOCS += technical/cruft-packs
105109
TECH_DOCS += technical/hash-function-transition
106110
TECH_DOCS += technical/http-protocol
107-
TECH_DOCS += technical/index-format
108111
TECH_DOCS += technical/long-running-process-protocol
109112
TECH_DOCS += technical/multi-pack-index
110-
TECH_DOCS += technical/pack-format
111113
TECH_DOCS += technical/pack-heuristics
112114
TECH_DOCS += technical/parallel-checkout
113115
TECH_DOCS += technical/partial-clone
114116
TECH_DOCS += technical/racy-git
115117
TECH_DOCS += technical/reftable
116118
TECH_DOCS += technical/send-pack-pipeline
117119
TECH_DOCS += technical/shallow
118-
TECH_DOCS += technical/signature-format
119120
TECH_DOCS += technical/trivial-merge
120121
SP_ARTICLES += $(TECH_DOCS)
121122
SP_ARTICLES += technical/api-index

Documentation/config/pack.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ permuted into their appropriate location when writing a new bitmap.
166166

167167
pack.writeReverseIndex::
168168
When true, git will write a corresponding .rev file (see:
169-
link:../technical/pack-format.html[Documentation/technical/pack-format.txt])
169+
linkgit:gitformat-pack[5])
170170
for each new packfile that it writes in all places except for
171171
linkgit:git-fast-import[1] and in the bulk checkin mechanism.
172172
Defaults to false.

Documentation/git-bundle.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ size. That they're "thin" under the hood is merely noted here as a
5757
curiosity, and as a reference to other documentation.
5858

5959
See linkgit:gitformat-bundle[5] for more details and the discussion of
60-
"thin pack" in link:technical/pack-format.html[the pack format
61-
documentation] for further details.
60+
"thin pack" in linkgit:gitformat-pack[5] for further details.
6261

6362
OPTIONS
6463
-------

Documentation/git-multi-pack-index.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ $ git multi-pack-index verify
128128
SEE ALSO
129129
--------
130130
See link:technical/multi-pack-index.html[The Multi-Pack-Index Design
131-
Document] and link:technical/pack-format.html[The Multi-Pack-Index
132-
Format] for more information on the multi-pack-index feature.
131+
Document] and linkgit:gitformat-pack[5] for more information on the
132+
multi-pack-index feature and its file format.
133133

134134

135135
GIT

Documentation/technical/chunk-format.txt renamed to Documentation/gitformat-chunk.txt

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
Chunk-based file formats
2-
========================
1+
gitformat-chunk(5)
2+
==================
3+
4+
NAME
5+
----
6+
gitformat-chunk - Chunk-based file formats
7+
8+
SYNOPSIS
9+
--------
10+
11+
Used by linkgit:gitformat-commit-graph[5] and the "MIDX" format (see
12+
the pack format documentation in linkgit:gitformat-pack[5]).
13+
14+
DESCRIPTION
15+
-----------
316

417
Some file formats in Git use a common concept of "chunks" to describe
518
sections of the file. This allows structured access to a large file by
619
scanning a small "table of contents" for the remaining data. This common
720
format is used by the `commit-graph` and `multi-pack-index` files. See
8-
link:technical/pack-format.html[the `multi-pack-index` format] and
21+
the `multi-pack-index` format in linkgit:gitformat-pack[5] and
922
the `commit-graph` format in linkgit:gitformat-commit-graph[5] for
1023
how they use the chunks to describe structured data.
1124

@@ -113,4 +126,8 @@ for future formats:
113126
* *multi-pack-index:* see `write_midx_internal()` and `load_multi_pack_index()`
114127
in `midx.c` for how the chunk-format API is used to write and
115128
parse the multi-pack-index file format documented in
116-
link:technical/pack-format.html[the multi-pack-index file format].
129+
the multi-pack-index file format section of linkgit:gitformat-pack[5].
130+
131+
GIT
132+
---
133+
Part of the linkgit:git[1] suite

Documentation/gitformat-commit-graph.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ All multi-byte numbers are in network byte order.
7575
ID appears at most once.
7676

7777
The CHUNK LOOKUP matches the table of contents from
78-
link:technical/chunk-format.html[the chunk-based file format].
78+
the chunk-based file format, see linkgit:gitformat-chunk[5]
7979

8080
The remaining data in the body is described one chunk at a time, and
8181
these chunks may be given in any order. Chunks are required unless

Documentation/technical/index-format.txt renamed to Documentation/gitformat-index.txt

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
1+
gitformat-index(5)
2+
==================
3+
4+
NAME
5+
----
6+
gitformat-index - Git index format
7+
8+
SYNOPSIS
9+
--------
10+
[verse]
11+
$GIT_DIR/index
12+
13+
DESCRIPTION
14+
-----------
15+
116
Git index format
2-
================
317

418
== The Git index file has the following format
519

@@ -127,7 +141,7 @@ Git index format
127141
entry is encoded as if the path name for the previous entry is an
128142
empty string). At the beginning of an entry, an integer N in the
129143
variable width encoding (the same encoding as the offset is encoded
130-
for OFS_DELTA pack entries; see pack-format.txt) is stored, followed
144+
for OFS_DELTA pack entries; see linkgit:gitformat-pack[5]) is stored, followed
131145
by a NUL-terminated string S. Removing N bytes from the end of the
132146
path name for the previous entry, and replacing it with the string S
133147
yields the path name for this entry.
@@ -404,3 +418,7 @@ The remaining data of each directory block is grouped by type:
404418
with signature { 's', 'd', 'i', 'r' }. Like the split-index extension,
405419
tools should avoid interacting with a sparse index unless they understand
406420
this extension.
421+
422+
GIT
423+
---
424+
Part of the linkgit:git[1] suite

Documentation/technical/cruft-packs.txt renamed to Documentation/gitformat-pack-cruft.txt

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
= Cruft packs
1+
gitformat-pack-cruft(5)
2+
=======================
3+
4+
NAME
5+
----
6+
gitformat-pack-cruft - The cruft pack file format
7+
8+
SYNOPSIS
9+
--------
10+
[verse]
11+
$GIT_DIR/objects/pack/pack-*.mtimes
12+
13+
DESCRIPTION
14+
-----------
215

316
The cruft packs feature offer an alternative to Git's traditional mechanism of
417
removing unreachable objects. This document provides an overview of Git's
@@ -10,10 +23,11 @@ same.
1023
To remove unreachable objects from your repository, Git offers `git repack -Ad`
1124
(see linkgit:git-repack[1]). Quoting from the documentation:
1225

13-
[quote]
26+
----
1427
[...] unreachable objects in a previous pack become loose, unpacked objects,
1528
instead of being left in the old pack. [...] loose unreachable objects will be
1629
pruned according to normal expiry rules with the next 'git gc' invocation.
30+
----
1731

1832
Unreachable objects aren't removed immediately, since doing so could race with
1933
an incoming push which may reference an object which is about to be deleted.
@@ -121,3 +135,7 @@ which aren't already stored in an earlier cruft pack) is significantly more
121135
complicated to construct, and so aren't pursued here. The obvious drawback to
122136
the current implementation is that the entire cruft pack must be re-written from
123137
scratch.
138+
139+
GIT
140+
---
141+
Part of the linkgit:git[1] suite

Documentation/technical/pack-format.txt renamed to Documentation/gitformat-pack.txt

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
1-
Git pack format
2-
===============
1+
gitformat-pack(5)
2+
=================
3+
4+
NAME
5+
----
6+
gitformat-pack - Git pack format
7+
8+
9+
SYNOPSIS
10+
--------
11+
[verse]
12+
$GIT_DIR/objects/pack/pack-*.{pack,idx}
13+
$GIT_DIR/objects/pack/pack-*.rev
14+
$GIT_DIR/objects/pack/multi-pack-index
15+
16+
DESCRIPTION
17+
-----------
18+
19+
The Git pack format is now Git stores most of its primary repository
20+
data. Over the lietime af a repository loose objects (if any) and
21+
smaller packs are consolidated into larger pack(s). See
22+
linkgit:git-gc[1] and linkgit:git-pack-objects[1].
23+
24+
The pack format is also used over-the-wire, see
25+
e.g. linkgit:gitprotocol-v2[5], as well as being a part of
26+
other container formats in the case of linkgit:gitformat-bundle[5].
327

428
== Checksums and object IDs
529

@@ -356,7 +380,7 @@ CHUNK LOOKUP:
356380
using the next chunk position if necessary.)
357381

358382
The CHUNK LOOKUP matches the table of contents from
359-
link:technical/chunk-format.html[the chunk-based file format].
383+
the chunk-based file format, see linkgit:gitformat-chunk[5].
360384

361385
The remaining data in the body is described one chunk at a time, and
362386
these chunks may be given in any order. Chunks are required unless
@@ -482,3 +506,7 @@ packs arranged in MIDX order (with the preferred pack coming first).
482506

483507
The MIDX's reverse index is stored in the optional 'RIDX' chunk within
484508
the MIDX itself.
509+
510+
GIT
511+
---
512+
Part of the linkgit:git[1] suite

Documentation/technical/signature-format.txt renamed to Documentation/gitformat-signature.txt

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
Git signature format
2-
====================
1+
gitformat-signature(5)
2+
======================
33

4-
== Overview
4+
NAME
5+
----
6+
gitformat-signature - Git cryptographic signature formats
7+
8+
SYNOPSIS
9+
--------
10+
[verse]
11+
<[tag|commit] object header(s)>
12+
<over-the-wire protocol>
13+
14+
DESCRIPTION
15+
-----------
516

617
Git uses cryptographic signatures in various places, currently objects (tags,
718
commits, mergetags) and transactions (pushes). In every case, the command which
@@ -200,3 +211,7 @@ Date: Wed Jun 15 09:13:29 2016 +0000
200211
# gpg: There is no indication that the signature belongs to the owner.
201212
# Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA 29A4 6109 2E85 B722 7189
202213
----
214+
215+
GIT
216+
---
217+
Part of the linkgit:git[1] suite

Documentation/gitprotocol-pack.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ Now that the client and server have finished negotiation about what
467467
the minimal amount of data that needs to be sent to the client is, the server
468468
will construct and send the required data in packfile format.
469469

470-
See pack-format.txt for what the packfile itself actually looks like.
470+
See linkgit:gitformat-pack[5] for what the packfile itself actually looks like.
471471

472472
If 'side-band' or 'side-band-64k' capabilities have been specified by
473473
the client, the server will send the packfile data multiplexed.

Documentation/howto/recover-corrupted-object-harder.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Note that the "object" file isn't fit for feeding straight to zlib; it
6868
has the git packed object header, which is variable-length. We want to
6969
strip that off so we can start playing with the zlib data directly. You
7070
can either work your way through it manually (the format is described in
71-
link:../technical/pack-format.html[Documentation/technical/pack-format.txt]),
71+
linkgit:gitformat-pack[5]),
7272
or you can walk through it in a debugger. I did the latter, creating a
7373
valid pack like:
7474

Documentation/technical/hash-function-transition.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ SHA-1 content.
205205
Object storage
206206
~~~~~~~~~~~~~~
207207
Loose objects use zlib compression and packed objects use the packed
208-
format described in Documentation/technical/pack-format.txt, just like
208+
format described in linkgit:gitformat-pack[5], just like
209209
today. The content that is compressed and stored uses SHA-256 content
210210
instead of SHA-1 content.
211211

Documentation/user-manual.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3133,7 +3133,7 @@ those "loose" objects.
31333133
You can save space and make Git faster by moving these loose objects in
31343134
to a "pack file", which stores a group of objects in an efficient
31353135
compressed format; the details of how pack files are formatted can be
3136-
found in link:technical/pack-format.html[pack format].
3136+
found in link:gitformat-pack[5].
31373137

31383138
To put the loose objects into a pack, just run git repack:
31393139

cache.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,7 @@ extern struct index_state the_index;
475475

476476
/*
477477
* Values in this enum (except those outside the 3 bit range) are part
478-
* of pack file format. See Documentation/technical/pack-format.txt
479-
* for more information.
478+
* of pack file format. See gitformat-pack(5) for more information.
480479
*/
481480
enum object_type {
482481
OBJ_BAD = -1,

command-list.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,12 @@ gitdiffcore guide
210210
giteveryday guide
211211
gitfaq guide
212212
gitformat-bundle developerinterfaces
213+
gitformat-chunk developerinterfaces
213214
gitformat-commit-graph developerinterfaces
215+
gitformat-index developerinterfaces
216+
gitformat-pack developerinterfaces
217+
gitformat-pack-cruft developerinterfaces
218+
gitformat-signature developerinterfaces
214219
gitglossary guide
215220
githooks userinterfaces
216221
gitignore userinterfaces

pack-revindex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
* - pack position refers to an object's position within a non-existent pack
2424
* described by the MIDX. The pack structure is described in
25-
* Documentation/technical/pack-format.txt.
25+
* gitformat-pack(5).
2626
*
2727
* It is effectively a concatanation of all packs in the MIDX (ordered by
2828
* their numeric ID within the MIDX) in their original order within each

0 commit comments

Comments
 (0)