Skip to content

Commit b373e4d

Browse files
szedergitster
authored andcommitted
Documentation/technical/protocol-v2.txt: fix formatting
Asciidoctor versions v1.5.7 or later print the following warning while building the documentation: ASCIIDOC technical/protocol-v2.html asciidoctor: WARNING: protocol-v2.txt: line 38: unterminated listing block This highlights an issue (even with older Asciidoctor versions) where the 'Initial Client Request' header is not rendered as a header but in monospace. I'm not sure what exactly causes this issue and why it's an issue only with this particular header, but all headers in 'protocol-v2.txt' are written like this: Initial Client Request ------------------------ i.e. the header itself is indented by a space, and the "underline" is two characters longer than the header. Dropping that indentation and making the length of the underline match the length of the header apparently fixes this issue. While at it, adjust all other headers 'protocol-v2.txt' as well, to match the style we use everywhere else. The page rendered with AsciiDoc doesn't have this formatting issue. Signed-off-by: SZEDER Gábor <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent eeb26f8 commit b373e4d

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

Documentation/technical/protocol-v2.txt

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Git Wire Protocol, Version 2
2-
==============================
1+
Git Wire Protocol, Version 2
2+
============================
33

44
This document presents a specification for a version 2 of Git's wire
55
protocol. Protocol v2 will improve upon v1 in the following ways:
@@ -22,8 +22,8 @@ will be commands which a client can request be executed. Once a command
2222
has completed, a client can reuse the connection and request that other
2323
commands be executed.
2424

25-
Packet-Line Framing
26-
---------------------
25+
Packet-Line Framing
26+
-------------------
2727

2828
All communication is done using packet-line framing, just as in v1. See
2929
`Documentation/technical/pack-protocol.txt` and
@@ -34,31 +34,31 @@ In protocol v2 these special packets will have the following semantics:
3434
* '0000' Flush Packet (flush-pkt) - indicates the end of a message
3535
* '0001' Delimiter Packet (delim-pkt) - separates sections of a message
3636

37-
Initial Client Request
38-
------------------------
37+
Initial Client Request
38+
----------------------
3939

4040
In general a client can request to speak protocol v2 by sending
4141
`version=2` through the respective side-channel for the transport being
4242
used which inevitably sets `GIT_PROTOCOL`. More information can be
4343
found in `pack-protocol.txt` and `http-protocol.txt`. In all cases the
4444
response from the server is the capability advertisement.
4545

46-
Git Transport
47-
~~~~~~~~~~~~~~~
46+
Git Transport
47+
~~~~~~~~~~~~~
4848

4949
When using the git:// transport, you can request to use protocol v2 by
5050
sending "version=2" as an extra parameter:
5151

5252
003egit-upload-pack /project.git\0host=myserver.com\0\0version=2\0
5353

54-
SSH and File Transport
55-
~~~~~~~~~~~~~~~~~~~~~~~~
54+
SSH and File Transport
55+
~~~~~~~~~~~~~~~~~~~~~~
5656

5757
When using either the ssh:// or file:// transport, the GIT_PROTOCOL
5858
environment variable must be set explicitly to include "version=2".
5959

60-
HTTP Transport
61-
~~~~~~~~~~~~~~~~
60+
HTTP Transport
61+
~~~~~~~~~~~~~~
6262

6363
When using the http:// or https:// transport a client makes a "smart"
6464
info/refs request as described in `http-protocol.txt` and requests that
@@ -79,8 +79,8 @@ A v2 server would reply:
7979
Subsequent requests are then made directly to the service
8080
`$GIT_URL/git-upload-pack`. (This works the same for git-receive-pack).
8181

82-
Capability Advertisement
83-
--------------------------
82+
Capability Advertisement
83+
------------------------
8484

8585
A server which decides to communicate (based on a request from a client)
8686
using protocol version 2, notifies the client by sending a version string
@@ -101,8 +101,8 @@ to be executed by the client.
101101
key = 1*(ALPHA | DIGIT | "-_")
102102
value = 1*(ALPHA | DIGIT | " -_.,?\/{}[]()<>!@#$%^&*+=:;")
103103

104-
Command Request
105-
-----------------
104+
Command Request
105+
---------------
106106

107107
After receiving the capability advertisement, a client can then issue a
108108
request to select the command it wants with any particular capabilities
@@ -137,8 +137,8 @@ command be executed or can terminate the connection. A client may
137137
optionally send an empty request consisting of just a flush-pkt to
138138
indicate that no more requests will be made.
139139

140-
Capabilities
141-
--------------
140+
Capabilities
141+
------------
142142

143143
There are two different types of capabilities: normal capabilities,
144144
which can be used to to convey information or alter the behavior of a
@@ -153,8 +153,8 @@ management on the server side in order to function correctly. This
153153
permits simple round-robin load-balancing on the server side, without
154154
needing to worry about state management.
155155

156-
agent
157-
~~~~~~~
156+
agent
157+
~~~~~
158158

159159
The server can advertise the `agent` capability with a value `X` (in the
160160
form `agent=X`) to notify the client that the server is running version
@@ -168,8 +168,8 @@ printable ASCII characters except space (i.e., the byte range 32 < x <
168168
and debugging purposes, and MUST NOT be used to programmatically assume
169169
the presence or absence of particular features.
170170

171-
ls-refs
172-
~~~~~~~~~
171+
ls-refs
172+
~~~~~~~
173173

174174
`ls-refs` is the command used to request a reference advertisement in v2.
175175
Unlike the current reference advertisement, ls-refs takes in arguments
@@ -199,8 +199,8 @@ The output of ls-refs is as follows:
199199
symref = "symref-target:" symref-target
200200
peeled = "peeled:" obj-id
201201

202-
fetch
203-
~~~~~~~
202+
fetch
203+
~~~~~
204204

205205
`fetch` is the command used to fetch a packfile in v2. It can be looked
206206
at as a modified version of the v1 fetch where the ref-advertisement is
@@ -444,8 +444,8 @@ header.
444444
2 - progress messages
445445
3 - fatal error message just before stream aborts
446446

447-
server-option
448-
~~~~~~~~~~~~~~~
447+
server-option
448+
~~~~~~~~~~~~~
449449

450450
If advertised, indicates that any number of server specific options can be
451451
included in a request. This is done by sending each option as a

0 commit comments

Comments
 (0)