Skip to content

Commit 97e955c

Browse files
authored
Improve terminology
1 parent 4558805 commit 97e955c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

book/10-git-internals/sections/transfer-protocols.asc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ $ ssh -x git@server "git-receive-pack 'simplegit-progit.git'"
153153
The `git-receive-pack` command immediately responds with one line for each reference it currently has – in this case, just the `master` branch and its SHA-1.
154154
The first line also has a list of the server's capabilities (here, `report-status`, `delete-refs`, and some others, including the client identifier).
155155

156-
Each line starts with a 4-character hex value specifying how long the whole the line is (including the 4-character length itself and the trailing linefeed).
157-
Your first line starts with 00a5, which is hexadecimal for 165, meaning the line is 165 bytes long.
158-
The next line is 0000, meaning the server is done with its references listing.
156+
The data is transmitted in chunks. Each chunk starts with a 4-character hex value specifying how long the chunk is (including the 4 bytes of the length itself). Chunks usually contain a single line of data and a trailing linefeed.
157+
Your first chunk starts with 00a5, which is hexadecimal for 165, meaning the chunk is 165 bytes long.
158+
The next chunk is 0000, meaning the server is done with its references listing.
159159

160160
Now that it knows the server's state, your `send-pack` process determines what commits it has that the server doesn't.
161161
For each reference that this push will update, the `send-pack` process tells the `receive-pack` process that information.
@@ -209,6 +209,8 @@ The client then makes another request, this time a `POST`, with the data that `s
209209
The `POST` request includes the `send-pack` output and the packfile as its payload.
210210
The server then indicates success or failure with its HTTP response.
211211

212+
213+
212214
===== Downloading Data
213215

214216
(((git commands, fetch-pack)))(((git commands, upload-pack)))

0 commit comments

Comments
 (0)