ref: fa51dc4bbdf459d0c8b44aa5001468e3e983d144
parent: 5b2bc75b8974f4fa9be720866d60b2e89f4f0a9f
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Dec 13 23:34:54 EST 2025
git/get: handle multi_ack status messages correctly Multi-ack mode sends back a stream of 'ACK id status' messages, terminating the stream with either 'NAK' or 'ACK id' without a status. Until we read one of those, we should keep grabbing more packets. Also, we don't expect a sidebankd packet here, so we should get rid of the garbage check for them.
--- a/sys/src/cmd/git/get.c
+++ b/sys/src/cmd/git/get.c
@@ -401,12 +401,9 @@
sysfatal("read: %r");if(strncmp(buf, "NAK\n", 4) == 0)
break;
- if(strncmp(buf, "ACK ", 4) == 0)
- break;
- if((c->sideband || c->sideband64k)
- && (buf[0] == 0 || buf[0] == 1 || buf[0] == 2)){- if(buf[0] == 2)
- fprint(2, "%s", buf);
+ if(strncmp(buf, "ACK ", 4) == 0){+ if(getfields(buf, sp, nelem(sp), 1, " \t") == 2)
+ break;
continue;
}
sysfatal("bad response: '%s'", buf);--
⑨