commit a6153ffb9ee91bb4fc544a98fae8d50cf2963841 from: Stefan Sperling via: Thomas Adam date: Sat Aug 12 11:13:45 2023 UTC gotd: stop logging "unexpected end of file" when a client decides to disconnect commit - 947f374dd47a87c593fce2335e59e1ac6d456c41 commit + a6153ffb9ee91bb4fc544a98fae8d50cf2963841 blob - 10a6aa7aa384b8d8773e28516972143fd0c7c93a blob + a11e0d04ec6b48b470eb5d9507fdf09ccf710f36 --- got/got.1 +++ got/got.1 @@ -976,6 +976,9 @@ Display diffstat of changes introduced in each commit. Cannot be used with the .Fl s option. +Implies the +.Fl P +option (diffstat displays a list of changed paths). .It Fl l Ar N Limit history traversal to a given number of commits. If this option is not specified, a default limit value of zero is used, blob - 3f8fb4963e1f9c22959b478bdc1a812a82cb88c6 blob + 63c88141e4edf1caafd25b0612e1ee3094111a79 --- gotd/gotd.c +++ gotd/gotd.c @@ -373,11 +373,13 @@ disconnect_on_error(struct gotd_client *client, const { struct imsgbuf ibuf; - log_warnx("uid %d: %s", client->euid, err->msg); - if (err->code != GOT_ERR_EOF && client->fd != -1) { - imsg_init(&ibuf, client->fd); - gotd_imsg_send_error(&ibuf, 0, PROC_GOTD, err); - imsg_clear(&ibuf); + if (err->code != GOT_ERR_EOF) { + log_warnx("uid %d: %s", client->euid, err->msg); + if (client->fd != -1) { + imsg_init(&ibuf, client->fd); + gotd_imsg_send_error(&ibuf, 0, PROC_GOTD, err); + imsg_clear(&ibuf); + } } disconnect(client); } blob - 6bb52da0072acc8ca769bbe69c71259b848ccbaf blob + 389075821465ee8b13c3cc0fb57127feea718885 --- gotd/session.c +++ gotd/session.c @@ -121,8 +121,8 @@ disconnect_on_error(struct gotd_session_client *client { struct imsgbuf ibuf; - log_warnx("uid %d: %s", client->euid, err->msg); if (err->code != GOT_ERR_EOF) { + log_warnx("uid %d: %s", client->euid, err->msg); imsg_init(&ibuf, client->fd); gotd_imsg_send_error(&ibuf, 0, gotd_session.proc_id, err); imsg_clear(&ibuf);