File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
book/10-git-internals/sections Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,17 @@ $ ssh -x git@server "git-receive-pack 'simplegit-progit.git'"
175
175
这里的全为 '0' 的 SHA-1 值表示之前没有过这个引用——因为你正要添加新的 experiment 引用。
176
176
删除引用时,将会看到相反的情况:右边的 SHA-1 值全为 '0'。
177
177
178
+ 然后,客户端会发送一个包含了所有服务端上所没有的对象的包文件。
179
+ 最终,服务端会响应一个成功(或失败)的标识。
180
+
181
+ [source]
182
+ ----
183
+ 000eunpack ok
184
+ ----
185
+
186
+ ====== HTTP(S)
187
+
188
+ 上传过程在 HTTP 上几乎是相同的,除了握手阶段有一点小区别。
178
189
连接是从下面这个请求开始的:
179
190
180
191
[source]
@@ -198,6 +209,8 @@ $ ssh -x git@server "git-receive-pack 'simplegit-progit.git'"
198
209
这个 `POST` 请求的内容是 `send-pack` 的输出和相应的包文件。
199
210
服务端在收到请求后相应地作出成功或失败的 HTTP 响应。
200
211
212
+ 请牢记,HTTP 协议有可能会进一步用分块传输编码将数据包裹起来。
213
+
201
214
===== 下载数据
202
215
203
216
(((git commands, fetch-pack)))(((git commands, upload-pack)))
You can’t perform that action at this time.
0 commit comments