summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2009-06-17 10:11:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-06-18 16:52:28 (GMT)
commit1b19fa46344f512949270dc88089574950519ea3 (patch)
tree5bdf2ee8230e8dc390d2822edc2c3bd7492a0ffe /git.c
parent959e2e64a594e2fb8de2585078e31b07a8da6fc9 (diff)
downloadgit-1b19fa46344f512949270dc88089574950519ea3.zip
git-1b19fa46344f512949270dc88089574950519ea3.tar.gz
git-1b19fa46344f512949270dc88089574950519ea3.tar.bz2
upload-archive: fix infinite loop on Cygwin
On Cygwin, poll() reports POLLIN even for file descriptors that have reached their end. This caused git upload-archive to be stuck in an infinite loop, as it only looked at the POLLIN flag. In addition to POLLIN, check if read() returned 0, which indicates end-of-file, and keep looping only as long as at least one of the file descriptors has input. This lets the following command finish on its own when run in a git repository on Cygwin, instead of it getting stuck after printing all file names: $ git archive -v --remote . HEAD >/dev/null Reported-by: Bob Kagy <bobkagy@gmail.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
0 files changed, 0 insertions, 0 deletions