ref: 59bc47d5e4b48489646c27e9b50529683fd17963
parent: ddeb8932c53d1d2f4d44cfc2697e9afac27d00d6
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Jan 30 00:08:54 EST 2025
werrstr shouldn't have a newline, and neither should sysfatal.
--- a/sys/src/cmd/git/pack.c
+++ b/sys/src/cmd/git/pack.c
@@ -929,7 +929,7 @@
t = &ent[nent++];
m = strtol(p, &p, 8);
if(*p != ' ')
- sysfatal("malformed tree %H: *p=(%d) %c\n", o->hash, *p, *p);
+ sysfatal("malformed tree %H: *p=(%d) %c", o->hash, *p, *p);
p++;
/*
* only the stored permissions for the user
--- a/sys/src/cmd/git/save.c
+++ b/sys/src/cmd/git/save.c
@@ -478,7 +478,7 @@
qsort(idx, nidx, sizeof(Idxent), idxcmp);
r = treeify(t, argv, argv + argc, 0, &th);
if(r == -1)
- sysfatal("could not commit: %r\n");
+ sysfatal("could not commit: %r");
mkcommit(&ch, date, th);
print("%H\n", ch);
exits(nil);
--- a/sys/src/cmd/git/send.c
+++ b/sys/src/cmd/git/send.c
@@ -215,7 +215,7 @@
if(strcmp(sp[0], "unpack") == 0 && strcmp(sp[1], "ok") != 0)
werrstr("unpack %s", sp[1]);
else if(strcmp(sp[0], "ng") == 0)
- werrstr("failed update: %s %s\n", sp[1], sp[2]);
+ werrstr("failed update: %s %s", sp[1], sp[2]);
else
continue;
return -1;
--- a/sys/src/cmd/git/util.c
+++ b/sys/src/cmd/git/util.c
@@ -504,12 +504,12 @@
e = s;
q.path = strtoull(e, &e, 16);
if(*e != '.')
- sysfatal("corrupt qid: %s (%s)\n", s, e);
+ sysfatal("corrupt qid: %s (%s)", s, e);
q.vers = strtoul(e+1, &e, 10);
if(*e != '.')
- sysfatal("corrupt qid: %s (%s)\n", s, e);
+ sysfatal("corrupt qid: %s (%s)", s, e);
q.type = strtoul(e+1, &e, 16);
if(*e != '\0')
- sysfatal("corrupt qid: %s (%x)\n", s, *e);
+ sysfatal("corrupt qid: %s (%x)", s, *e);
return q;
}
--
⑨