diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2009-06-17 12:11:10 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-18 09:52:28 -0700 |
commit | 1b19fa46344f512949270dc88089574950519ea3 (patch) | |
tree | 5bdf2ee8230e8dc390d2822edc2c3bd7492a0ffe /branch.h | |
parent | avoid exponential regex match for java and objc function names (diff) | |
download | tgif-1b19fa46344f512949270dc88089574950519ea3.tar.xz |
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 'branch.h')
0 files changed, 0 insertions, 0 deletions