summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-12-03 21:50:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-12-03 21:50:24 (GMT)
commitef3a4fd670a4874f9b598ef96b10b89117b806e1 (patch)
tree7f3c3e505922f37e94b57aea625b4ad571a989bd /upload-pack.c
parent59a0a0bd579087cce9f7baf6627e5add5a538097 (diff)
parent6b59f51b312f06d9420d34c09fa408c658aac6d2 (diff)
downloadgit-ef3a4fd670a4874f9b598ef96b10b89117b806e1.zip
git-ef3a4fd670a4874f9b598ef96b10b89117b806e1.tar.gz
git-ef3a4fd670a4874f9b598ef96b10b89117b806e1.tar.bz2
Merge branch 'np/maint-sideband-favor-status' into maint
* np/maint-sideband-favor-status: give priority to progress messages
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 38ddac2..953ebe1 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -308,6 +308,23 @@ static void create_pack_file(void)
}
continue;
}
+ if (0 <= pe && (pfd[pe].revents & (POLLIN|POLLHUP))) {
+ /* Status ready; we ship that in the side-band
+ * or dump to the standard error.
+ */
+ sz = xread(pack_objects.err, progress,
+ sizeof(progress));
+ if (0 < sz)
+ send_client_data(2, progress, sz);
+ else if (sz == 0) {
+ close(pack_objects.err);
+ pack_objects.err = -1;
+ }
+ else
+ goto fail;
+ /* give priority to status messages */
+ continue;
+ }
if (0 <= pu && (pfd[pu].revents & (POLLIN|POLLHUP))) {
/* Data ready; we keep the last byte to ourselves
* in case we detect broken rev-list, so that we
@@ -345,21 +362,6 @@ static void create_pack_file(void)
if (sz < 0)
goto fail;
}
- if (0 <= pe && (pfd[pe].revents & (POLLIN|POLLHUP))) {
- /* Status ready; we ship that in the side-band
- * or dump to the standard error.
- */
- sz = xread(pack_objects.err, progress,
- sizeof(progress));
- if (0 < sz)
- send_client_data(2, progress, sz);
- else if (sz == 0) {
- close(pack_objects.err);
- pack_objects.err = -1;
- }
- else
- goto fail;
- }
}
if (finish_command(&pack_objects)) {