From 82eaae8218660eb2c07bc5b68c91e7bb06f85a1f Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Tue, 3 May 2005 08:55:17 +0000 Subject: catch stupid gnu cvs behaviour, it sends an empty error message at the end of a diff command (even successfull ones) so we have to make sure not to show the empty line on screen. ok xsa@ --- usr.bin/cvs/resp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/usr.bin/cvs/resp.c b/usr.bin/cvs/resp.c index 22731f8e30f..59200b0432a 100644 --- a/usr.bin/cvs/resp.c +++ b/usr.bin/cvs/resp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resp.c,v 1.30 2005/04/20 15:50:54 joris Exp $ */ +/* $OpenBSD: resp.c,v 1.31 2005/05/03 08:55:16 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -302,11 +302,19 @@ cvs_resp_ok(struct cvsroot *root, int type, char *line) * cvs_resp_error() * * Handler for the `error' response. This handler's job is to + * show the error message given by the server. */ static int cvs_resp_error(struct cvsroot *root, int type, char *line) { + /* XXX - GNU cvs sends an empty error message + * at the end of the diff command, even for successfull + * diff. + */ + if ((strlen(line) == 1) && (*line == ' ')) + return (1); + fprintf(stderr, "%s\n", line); return (1); } -- cgit v1.2.3