ref: f65b0ec2cd01428bba712d7008329c60b0cfad60
parent: 4f3a4d8b3da7e7f38b4bc392524944f6f9ccf21f
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Nov 13 20:15:35 EST 2025
git/get: allow side band messages before ACK. Sourcehut has been observed sending status messages before the final ack has been seen; we should show the messages and proceed. I think this is technically a bug in sr.ht
--- a/sys/src/cmd/git/get.c
+++ b/sys/src/cmd/git/get.c
@@ -401,8 +401,14 @@
sysfatal("read: %r");if(strncmp(buf, "NAK\n", 4) == 0)
break;
- if(strncmp(buf, "ACK ", 4) != 0)
- sysfatal("bad response: '%s'", buf);+ if(strncmp(buf, "ACK ", 4) == 0)
+ break;
+ if(c->sideband && buf[0] == 0 || buf[0] == 1 || buf[0] == 2){+ if(buf[0] == 2)
+ fprint(2, "%s", buf);
+ continue;
+ }
+ sysfatal("bad response: '%s'", buf);}
}
if(readpkt(c, buf, sizeof(buf)) == -1)
--
⑨