path: root/git.c
diff options
authorRené Scharfe <>2009-06-17 10:11:10 (GMT)
committerJunio C Hamano <>2009-06-18 16:52:28 (GMT)
commit1b19fa46344f512949270dc88089574950519ea3 (patch)
tree5bdf2ee8230e8dc390d2822edc2c3bd7492a0ffe /git.c
parent959e2e64a594e2fb8de2585078e31b07a8da6fc9 (diff)
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 <> Signed-off-by: Rene Scharfe <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'git.c')
0 files changed, 0 insertions, 0 deletions