summaryrefslogtreecommitdiff
path: root/builtin-upload-archive.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-upload-archive.c')
-rw-r--r--builtin-upload-archive.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-upload-archive.c b/builtin-upload-archive.c
index 115a12dc13..0596865679 100644
--- a/builtin-upload-archive.c
+++ b/builtin-upload-archive.c
@@ -160,7 +160,8 @@ int cmd_upload_archive(int argc, const char **argv, const char *prefix)
if (pfd[1].revents & POLLIN)
/* Status stream ready */
process_input(pfd[1].fd, 2);
- if ((pfd[0].revents | pfd[1].revents) == POLLIN)
+ /* Always finish to read data when available */
+ if ((pfd[0].revents | pfd[1].revents) & POLLIN)
continue;
if (waitpid(writer, &status, 0) < 0)