Skip to content

Commit 977c47b

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 to a gitformat-chunk-format page. Integrating "Documentation/technical/bitmap-format.txt" and "Documentation/technical/cruft-packs.txt" might logically be part of this change, but as those cover parts of the wider "pack format" (including associated files) that's documented outside of "Documentation/technical/pack-format.txt" let's leave those for now, subsequent commit(s) will address those. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2051689 commit 977c47b

15 files changed

+68
-22
lines changed

Documentation/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ 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
2930
MAN5_TXT += gitformat-index.txt
31+
MAN5_TXT += gitformat-pack.txt
3032
MAN5_TXT += gitformat-signature.txt
3133
MAN5_TXT += githooks.txt
3234
MAN5_TXT += gitignore.txt
@@ -108,7 +110,6 @@ TECH_DOCS += technical/hash-function-transition
108110
TECH_DOCS += technical/http-protocol
109111
TECH_DOCS += technical/long-running-process-protocol
110112
TECH_DOCS += technical/multi-pack-index
111-
TECH_DOCS += technical/pack-format
112113
TECH_DOCS += technical/pack-heuristics
113114
TECH_DOCS += technical/parallel-checkout
114115
TECH_DOCS += technical/partial-clone

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/gitformat-index.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Git index format
141141
entry is encoded as if the path name for the previous entry is an
142142
empty string). At the beginning of an entry, an integer N in the
143143
variable width encoding (the same encoding as the offset is encoded
144-
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
145145
by a NUL-terminated string S. Removing N bytes from the end of the
146146
path name for the previous entry, and replacing it with the string S
147147
yields the path name for this entry.

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/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

0 commit comments

Comments
 (0)