File: pack-protocol.txt

package info (click to toggle)
git-core 1%3A1.4.4.4-2
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 5,980 kB
  • ctags: 5,444
  • sloc: ansic: 50,068; sh: 14,854; perl: 12,752; tcl: 5,714; python: 2,754; makefile: 981; lisp: 977; asm: 219
file content (41 lines) | stat: -rw-r--r-- 879 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Pack transfer protocols
=======================

There are two Pack push-pull protocols.

upload-pack (S) | fetch/clone-pack (C) protocol:

	# Tell the puller what commits we have and what their names are
	S: SHA1 name
	S: ...
	S: SHA1 name
	S: # flush -- it's your turn
	# Tell the pusher what commits we want, and what we have
	C: want name
	C: ..
	C: want name
	C: have SHA1
	C: have SHA1
	C: ...
	C: # flush -- occasionally ask "had enough?"
	S: NAK
	C: have SHA1
	C: ...
	C: have SHA1
	S: ACK
	C: done
	S: XXXXXXX -- packfile contents.

send-pack | receive-pack protocol.

	# Tell the pusher what commits we have and what their names are
	C: SHA1 name
	C: ...
	C: SHA1 name
	C: # flush -- it's your turn
	# Tell the puller what the pusher has
	S: old-SHA1 new-SHA1 name
	S: old-SHA1 new-SHA1 name
	S: ...
	S: # flush -- done with the list
	S: XXXXXXX --- packfile contents.