Skip to content

Commit c0f6dd4

Browse files
committed
Merge branch 'ab/tech-docs-to-help'
Expose a lot of "tech docs" via "git help" interface. * ab/tech-docs-to-help: docs: move http-protocol docs to man section 5 docs: move cruft pack docs to gitformat-pack docs: move pack format docs to man section 5 docs: move signature docs to man section 5 docs: move index format docs to man section 5 docs: move protocol-related docs to man section 5 docs: move commit-graph format docs to man section 5 git docs: add a category for file formats, protocols and interfaces git docs: add a category for user-facing file, repo and command UX git help doc: use "<doc>" instead of "<guide>" help.c: remove common category behavior from drop_prefix() behavior help.c: refactor drop_prefix() to use a "switch" statement"
2 parents 3adacc2 + 1e23201 commit c0f6dd4

40 files changed

+590
-243
lines changed

Documentation/Makefile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,21 @@ MAN1_TXT += gitweb.txt
2424

2525
# man5 / man7 guides (note: new guides should also be added to command-list.txt)
2626
MAN5_TXT += gitattributes.txt
27+
MAN5_TXT += gitformat-bundle.txt
28+
MAN5_TXT += gitformat-chunk.txt
29+
MAN5_TXT += gitformat-commit-graph.txt
30+
MAN5_TXT += gitformat-index.txt
31+
MAN5_TXT += gitformat-pack.txt
32+
MAN5_TXT += gitformat-signature.txt
2733
MAN5_TXT += githooks.txt
2834
MAN5_TXT += gitignore.txt
2935
MAN5_TXT += gitmailmap.txt
3036
MAN5_TXT += gitmodules.txt
37+
MAN5_TXT += gitprotocol-capabilities.txt
38+
MAN5_TXT += gitprotocol-common.txt
39+
MAN5_TXT += gitprotocol-http.txt
40+
MAN5_TXT += gitprotocol-pack.txt
41+
MAN5_TXT += gitprotocol-v2.txt
3142
MAN5_TXT += gitrepository-layout.txt
3243
MAN5_TXT += gitweb.conf.txt
3344

@@ -95,26 +106,16 @@ TECH_DOCS += MyFirstObjectWalk
95106
TECH_DOCS += SubmittingPatches
96107
TECH_DOCS += ToolsForGit
97108
TECH_DOCS += technical/bitmap-format
98-
TECH_DOCS += technical/bundle-format
99-
TECH_DOCS += technical/cruft-packs
100109
TECH_DOCS += technical/hash-function-transition
101-
TECH_DOCS += technical/http-protocol
102-
TECH_DOCS += technical/index-format
103110
TECH_DOCS += technical/long-running-process-protocol
104111
TECH_DOCS += technical/multi-pack-index
105-
TECH_DOCS += technical/pack-format
106112
TECH_DOCS += technical/pack-heuristics
107-
TECH_DOCS += technical/pack-protocol
108113
TECH_DOCS += technical/parallel-checkout
109114
TECH_DOCS += technical/partial-clone
110-
TECH_DOCS += technical/protocol-capabilities
111-
TECH_DOCS += technical/protocol-common
112-
TECH_DOCS += technical/protocol-v2
113115
TECH_DOCS += technical/racy-git
114116
TECH_DOCS += technical/reftable
115117
TECH_DOCS += technical/send-pack-pipeline
116118
TECH_DOCS += technical/shallow
117-
TECH_DOCS += technical/signature-format
118119
TECH_DOCS += technical/trivial-merge
119120
SP_ARTICLES += $(TECH_DOCS)
120121
SP_ARTICLES += technical/api-index
@@ -290,6 +291,8 @@ cmds_txt = cmds-ancillaryinterrogators.txt \
290291
cmds-synchingrepositories.txt \
291292
cmds-synchelpers.txt \
292293
cmds-guide.txt \
294+
cmds-developerinterfaces.txt \
295+
cmds-userinterfaces.txt \
293296
cmds-purehelpers.txt \
294297
cmds-foreignscminterface.txt
295298

Documentation/config/lsrefs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
lsrefs.unborn::
22
May be "advertise" (the default), "allow", or "ignore". If "advertise",
33
the server will respond to the client sending "unborn" (as described in
4-
protocol-v2.txt) and will advertise support for this feature during the
4+
linkgit:gitprotocol-v2[5]) and will advertise support for this feature during the
55
protocol v2 capability advertisement. "allow" is the same as
66
"advertise" except that the server will not advertise support for this
77
feature; this is useful for load-balanced servers that cannot be

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/config/protocol.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ protocol.version::
5858
* `1` - the original wire protocol with the addition of a version string
5959
in the initial response from the server.
6060

61-
* `2` - link:technical/protocol-v2.html[wire protocol version 2].
61+
* `2` - Wire protocol version 2, see linkgit:gitprotocol-v2[5].
6262

6363
--

Documentation/git-bundle.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@ using "thin packs", bundles created using exclusions are smaller in
5656
size. That they're "thin" under the hood is merely noted here as a
5757
curiosity, and as a reference to other documentation.
5858

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

6462
OPTIONS
6563
-------
@@ -77,7 +75,7 @@ verify <file>::
7775
commits exist and are fully linked in the current repository.
7876
Then, 'git bundle' prints a list of missing commits, if any.
7977
Finally, information about additional capabilities, such as "object
80-
filter", is printed. See "Capabilities" in link:technical/bundle-format.html
78+
filter", is printed. See "Capabilities" in linkgit:gitformat-bundle[5]
8179
for more information. The exit code is zero for success, but will
8280
be nonzero if the bundle file is invalid.
8381

@@ -337,6 +335,11 @@ You can also see what references it offers:
337335
$ git ls-remote mybundle
338336
----------------
339337

338+
FILE FORMAT
339+
-----------
340+
341+
See linkgit:gitformat-bundle[5].
342+
340343
GIT
341344
---
342345
Part of the linkgit:git[1] suite

Documentation/git-commit-graph.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ $ git rev-parse HEAD | git commit-graph write --stdin-commits --append
143143
------------------------------------------------
144144

145145

146+
FILE FORMAT
147+
-----------
148+
149+
see linkgit:gitformat-commit-graph[5].
150+
146151
GIT
147152
---
148153
Part of the linkgit:git[1] suite

Documentation/git-help.txt

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ SYNOPSIS
99
--------
1010
[verse]
1111
'git help' [-a|--all] [--[no-]verbose] [--[no-]external-commands] [--[no-]aliases]
12-
'git help' [[-i|--info] [-m|--man] [-w|--web]] [<command>|<guide>]
12+
'git help' [[-i|--info] [-m|--man] [-w|--web]] [<command>|<doc>]
1313
'git help' [-g|--guides]
1414
'git help' [-c|--config]
15+
'git help' [--user-interfaces]
16+
'git help' [--developer-interfaces]
1517

1618
DESCRIPTION
1719
-----------
1820

19-
With no options and no '<command>' or '<guide>' given, the synopsis of the 'git'
21+
With no options and no '<command>' or '<doc>' given, the synopsis of the 'git'
2022
command and a list of the most commonly used Git commands are printed
2123
on the standard output.
2224

@@ -26,8 +28,8 @@ printed on the standard output.
2628
If the option `--guides` or `-g` is given, a list of the
2729
Git concept guides is also printed on the standard output.
2830

29-
If a command, or a guide, is given, a manual page for that command or
30-
guide is brought up. The 'man' program is used by default for this
31+
If a command or other documentation is given, the relevant manual page
32+
will be brought up. The 'man' program is used by default for this
3133
purpose, but this can be overridden by other options or configuration
3234
variables.
3335

@@ -69,6 +71,23 @@ OPTIONS
6971
--guides::
7072
Prints a list of the Git concept guides on the standard output.
7173

74+
--user-interfaces::
75+
Prints a list of the repository, command and file interfaces
76+
documentation on the standard output.
77+
+
78+
In-repository file interfaces such as `.git/info/exclude` are
79+
documented here (see linkgit:gitrepository-layout[5]), as well as
80+
in-tree configuration such as `.mailmap` (see linkgit:gitmailmap[5]).
81+
+
82+
This section of the documentation also covers general or widespread
83+
user-interface conventions (e.g. linkgit:gitcli[7]), and
84+
pseudo-configuration such as the file-based `.git/hooks/*` interface
85+
described in linkgit:githooks[5].
86+
87+
--developer-interfaces::
88+
Print list of file formats, protocols and other developer
89+
interfaces documentation on the standard output.
90+
7291
-i::
7392
--info::
7493
Display manual page for the command in the 'info' format. The

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/git-upload-pack.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ OPTIONS
3939
--http-backend-info-refs::
4040
Used by linkgit:git-http-backend[1] to serve up
4141
`$GIT_URL/info/refs?service=git-upload-pack` requests. See
42-
"Smart Clients" in link:technical/http-protocol.html[the HTTP
43-
transfer protocols] documentation and "HTTP Transport" in
44-
link:technical/protocol-v2.html[the Git Wire Protocol, Version
45-
2] documentation. Also understood by
42+
"Smart Clients" in linkgit:gitprotocol-http[5] and "HTTP
43+
Transport" in in the linkgit:gitprotocol-v2[5]
44+
documentation. Also understood by
4645
linkgit:git-receive-pack[1].
4746

4847
<directory>::

Documentation/git.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,23 @@ The following documentation pages are guides about Git concepts.
339339

340340
include::cmds-guide.txt[]
341341

342+
Repository, command and file interfaces
343+
---------------------------------------
344+
345+
This documentation discusses repository and command interfaces which
346+
users are expected to interact with directly. See `--user-formats` in
347+
linkgit:git-help[1] for more details on the critera.
348+
349+
include::cmds-userinterfaces.txt[]
350+
351+
File formats, protocols and other developer interfaces
352+
------------------------------------------------------
353+
354+
This documentation discusses file formats, over-the-wire protocols and
355+
other git developer interfaces. See `--developer-interfaces` in
356+
linkgit:git-help[1].
357+
358+
include::cmds-developerinterfaces.txt[]
342359

343360
Configuration Mechanism
344361
-----------------------

0 commit comments

Comments
 (0)