summaryrefslogtreecommitdiff
path: root/builtin-prune-packed.c
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-11-17 22:09:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-18 04:27:29 (GMT)
commit1f759eeede0597580be8ce26305550350e3c017a (patch)
tree4fd24e79e76c697ebf1bf670c2980d4526910ac0 /builtin-prune-packed.c
parent5f9ffff308845e2439670ec3cb2c12f4865cf430 (diff)
downloadgit-1f759eeede0597580be8ce26305550350e3c017a.zip
git-1f759eeede0597580be8ce26305550350e3c017a.tar.gz
git-1f759eeede0597580be8ce26305550350e3c017a.tar.bz2
fetch-pack: Prepare for a side-band demultiplexer in a thread.
get_pack() receives a pair of file descriptors that communicate with upload-pack at the remote end. In order to support the case where the side-band demultiplexer runs in a thread, and, hence, in the same process as the main routine, we must not close the readable file descriptor early. The handling of the readable fd is changed in the case where upload-pack supports side-band communication: The old code closed the fd after it was inherited to the side-band demultiplexer process. Now we do not close it. The caller (do_fetch_pack) will close it later anyway. The demultiplexer is the only reader, it does not matter that the fd remains open in the main process as well as in unpack-objects/index-pack, which inherits it. The writable fd is not needed in get_pack(), hence, the old code closed the fd. For symmetry with the readable fd, we now do not close it; the caller (do_fetch_pack) will close it later anyway. Therefore, the new behavior is that the channel now remains open during the entire conversation, but this has no ill effects because upload-pack does not read from it once it has begun to send the pack data. For the same reason it does not matter that the writable fd is now inherited to the demultiplexer and unpack-objects/index-pack processes. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-prune-packed.c')
0 files changed, 0 insertions, 0 deletions