diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-12-03 13:50:24 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-12-03 13:50:24 -0800 |
commit | ef3a4fd670a4874f9b598ef96b10b89117b806e1 (patch) | |
tree | 7f3c3e505922f37e94b57aea625b4ad571a989bd /builtin-upload-archive.c | |
parent | 59a0a0bd579087cce9f7baf6627e5add5a538097 (diff) | |
parent | 6b59f51b312f06d9420d34c09fa408c658aac6d2 (diff) | |
download | git-ef3a4fd670a4874f9b598ef96b10b89117b806e1.tar.gz git-ef3a4fd670a4874f9b598ef96b10b89117b806e1.tar.xz |
Merge branch 'np/maint-sideband-favor-status' into maint
* np/maint-sideband-favor-status:
give priority to progress messages
Diffstat (limited to 'builtin-upload-archive.c')
-rw-r--r-- | builtin-upload-archive.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/builtin-upload-archive.c b/builtin-upload-archive.c index c4cd1e132..29446e84c 100644 --- a/builtin-upload-archive.c +++ b/builtin-upload-archive.c @@ -132,7 +132,6 @@ int cmd_upload_archive(int argc, const char **argv, const char *prefix) while (1) { struct pollfd pfd[2]; - ssize_t processed[2] = { 0, 0 }; int status; pfd[0].fd = fd1[0]; @@ -147,15 +146,14 @@ int cmd_upload_archive(int argc, const char **argv, const char *prefix) } continue; } - if (pfd[0].revents & POLLIN) - /* Data stream ready */ - processed[0] = process_input(pfd[0].fd, 1); if (pfd[1].revents & POLLIN) /* Status stream ready */ - processed[1] = process_input(pfd[1].fd, 2); - /* Always finish to read data when available */ - if (processed[0] || processed[1]) - continue; + if (process_input(pfd[1].fd, 2)) + continue; + if (pfd[0].revents & POLLIN) + /* Data stream ready */ + if (process_input(pfd[0].fd, 1)) + continue; if (waitpid(writer, &status, 0) < 0) error_clnt("%s", lostchild); |