author | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Jun 2006 01:26:34 +0000 (18:26 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Jun 2006 09:34:14 +0000 (02:34 -0700) | ||
commit | b1c71b72815cb82a8bad14020a047320b88a04eb | |
tree | b30437f3d0cba446ae96105339a23a416f512ba7 | tree | snapshot |
parent | bb9e15a83c425ff31e4da6b004bd4557d528b755 | commit | diff |
upload-pack: avoid sending an incomplete pack upon failure
When the repository on the remote side is corrupted, rev-list
spawned from upload-pack would die with error, but pack-objects
that reads from the rev-list happily created a packfile that can
be unpacked by the downloader. When this happens, the resulting
packfile is not corrupted and unpacks cleanly, but the list of
the objects contained in it is not what the protocol exchange
computed.
This update makes upload-pack to monitor its subprocesses, and
when either of them dies with error, sends an incomplete pack
data to the downloader to cause it to fail.
Signed-off-by: Junio C Hamano <junkio@cox.net>
When the repository on the remote side is corrupted, rev-list
spawned from upload-pack would die with error, but pack-objects
that reads from the rev-list happily created a packfile that can
be unpacked by the downloader. When this happens, the resulting
packfile is not corrupted and unpacks cleanly, but the list of
the objects contained in it is not what the protocol exchange
computed.
This update makes upload-pack to monitor its subprocesses, and
when either of them dies with error, sends an incomplete pack
data to the downloader to cause it to fail.
Signed-off-by: Junio C Hamano <junkio@cox.net>
upload-pack.c | diff | blob | history |