X7ROOT File Manager
Current Path:
/usr/share/doc/git-1.8.3.1/technical
usr
/
share
/
doc
/
git-1.8.3.1
/
technical
/
📁
..
📄
api-allocation-growing.html
(17.55 KB)
📄
api-allocation-growing.txt
(1019 B)
📄
api-argv-array.html
(19.44 KB)
📄
api-argv-array.txt
(2.12 KB)
📄
api-builtin.html
(19.43 KB)
📄
api-builtin.txt
(2 KB)
📄
api-config.html
(23.39 KB)
📄
api-config.txt
(5.18 KB)
📄
api-credentials.html
(27.9 KB)
📄
api-credentials.txt
(8.87 KB)
📄
api-decorate.html
(16.23 KB)
📄
api-decorate.txt
(60 B)
📄
api-diff.html
(24.32 KB)
📄
api-diff.txt
(5.22 KB)
📄
api-directory-listing.html
(20.75 KB)
📄
api-directory-listing.txt
(2.71 KB)
📄
api-gitattributes.html
(21.9 KB)
📄
api-gitattributes.txt
(3.62 KB)
📄
api-grep.html
(16.31 KB)
📄
api-grep.txt
(76 B)
📄
api-hash.html
(18.42 KB)
📄
api-hash.txt
(1.4 KB)
📄
api-hashmap.html
(35.57 KB)
📄
api-hashmap.txt
(7.71 KB)
📄
api-history-graph.html
(24.08 KB)
📄
api-history-graph.txt
(5.9 KB)
📄
api-in-core-index.html
(16.96 KB)
📄
api-in-core-index.txt
(457 B)
📄
api-index-skel.txt
(431 B)
📄
api-index.html
(18.45 KB)
📄
api-index.sh
(611 B)
📄
api-index.txt
(1.68 KB)
📄
api-lockfile.html
(20.05 KB)
📄
api-lockfile.txt
(2.92 KB)
📄
api-merge.html
(21.36 KB)
📄
api-merge.txt
(3.3 KB)
📄
api-object-access.html
(16.73 KB)
📄
api-object-access.txt
(342 B)
📄
api-parse-options.html
(31.03 KB)
📄
api-parse-options.txt
(9.36 KB)
📄
api-quote.html
(16.42 KB)
📄
api-quote.txt
(145 B)
📄
api-ref-iteration.html
(19.71 KB)
📄
api-ref-iteration.txt
(2.41 KB)
📄
api-remote.html
(21.26 KB)
📄
api-remote.txt
(3.3 KB)
📄
api-revision-walking.html
(19.76 KB)
📄
api-revision-walking.txt
(2.39 KB)
📄
api-run-command.html
(28.25 KB)
📄
api-run-command.txt
(8.08 KB)
📄
api-setup.html
(16.51 KB)
📄
api-setup.txt
(180 B)
📄
api-sha1-array.html
(19.39 KB)
📄
api-sha1-array.txt
(2.25 KB)
📄
api-sigchain.html
(17.74 KB)
📄
api-sigchain.txt
(1.34 KB)
📄
api-strbuf.html
(32.15 KB)
📄
api-strbuf.txt
(10.17 KB)
📄
api-string-list.html
(26.42 KB)
📄
api-string-list.txt
(6.84 KB)
📄
api-tree-walking.html
(23.17 KB)
📄
api-tree-walking.txt
(4.27 KB)
📄
api-xdiff-interface.html
(16.3 KB)
📄
api-xdiff-interface.txt
(139 B)
📄
index-format.html
(27.12 KB)
📄
index-format.txt
(6.29 KB)
📄
pack-format.html
(24.08 KB)
📄
pack-format.txt
(5.54 KB)
📄
pack-heuristics.html
(42.74 KB)
📄
pack-heuristics.txt
(17.77 KB)
📄
pack-protocol.html
(43.12 KB)
📄
pack-protocol.txt
(20.99 KB)
📄
protocol-capabilities.html
(25.41 KB)
📄
protocol-capabilities.txt
(7.09 KB)
📄
protocol-common.html
(20.08 KB)
📄
protocol-common.txt
(2.7 KB)
📄
racy-git.html
(26.85 KB)
📄
racy-git.txt
(8.63 KB)
📄
send-pack-pipeline.html
(18.73 KB)
📄
send-pack-pipeline.txt
(1.92 KB)
📄
shallow.html
(18.86 KB)
📄
shallow.txt
(2.3 KB)
📄
trivial-merge.html
(21.62 KB)
📄
trivial-merge.txt
(4.16 KB)
Editing: send-pack-pipeline.txt
Git-send-pack internals ======================= Overall operation ----------------- . Connects to the remote side and invokes git-receive-pack. . Learns what refs the remote has and what commit they point at. Matches them to the refspecs we are pushing. . Checks if there are non-fast-forwards. Unlike fetch-pack, the repository send-pack runs in is supposed to be a superset of the recipient in fast-forward cases, so there is no need for want/have exchanges, and fast-forward check can be done locally. Tell the result to the other end. . Calls pack_objects() which generates a packfile and sends it over to the other end. . If the remote side is new enough (v1.1.0 or later), wait for the unpack and hook status from the other end. . Exit with appropriate error codes. Pack_objects pipeline --------------------- This function gets one file descriptor (`fd`) which is either a socket (over the network) or a pipe (local). What's written to this fd goes to git-receive-pack to be unpacked. send-pack ---> fd ---> receive-pack The function pack_objects creates a pipe and then forks. The forked child execs pack-objects with --revs to receive revision parameters from its standard input. This process will write the packfile to the other end. send-pack | pack_objects() ---> fd ---> receive-pack | ^ (pipe) v | (child) The child dup2's to arrange its standard output to go back to the other end, and read its standard input to come from the pipe. After that it exec's pack-objects. On the other hand, the parent process, before starting to feed the child pipeline, closes the reading side of the pipe and fd to receive-pack. send-pack | pack_objects(parent) | v [0] pack-objects [0] ---> receive-pack [jc: the pipeline was much more complex and needed documentation before I understood an earlier bug, but now it is trivial and straightforward.]
Upload File
Create Folder