ref: cbd0ebcb94afab9f5183ffc7e5a3ab1ed78d83d4
parent: 509c4b111d120599a01fb31a64f17102dbabe07e
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Jan 29 23:34:32 EST 2025
git/send: set errstr when reporting status we print the errstr the next level up, so just set werrstr, instead of printing and then showing a bogus error message
--- a/sys/src/cmd/git/send.c
+++ b/sys/src/cmd/git/send.c
@@ -204,7 +204,7 @@
if(chattygit)
fprint(2, "done sending pack, status %s\n", buf);
nsp = getfields(buf, sp, nelem(sp), 1, " \t\n\r");
- if(nsp < 2)
+ if(nsp < 2)
continue;
if(nsp < 3)
sp[2] = "";
@@ -213,9 +213,9 @@
* surrounding scripts.
*/
if(strcmp(sp[0], "unpack") == 0 && strcmp(sp[1], "ok") != 0)
- fprint(2, "unpack %s\n", sp[1]);
+ werrstr("unpack %s", sp[1]);
else if(strcmp(sp[0], "ng") == 0)
- fprint(2, "failed update: %s\n", sp[1]);
+ werrstr("failed update: %s %s\n", sp[1], sp[2]);
else
continue;
return -1;
--
⑨