diff options
author | Nicolas Pitre <nico@cam.org> | 2007-11-09 14:33:54 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-09 22:25:36 -0800 |
commit | d048a96ee9bec968be0bdc9c43ffce61169545be (patch) | |
tree | 9f8f1a6812eedab4a7d219d8a9e1920beb25a115 | |
parent | b9217c09386e5313ac6a54cc91cf03149514154b (diff) | |
download | git-d048a96ee9bec968be0bdc9c43ffce61169545be.tar.gz git-d048a96ee9bec968be0bdc9c43ffce61169545be.tar.xz |
print warning/error/fatal messages in one shot
Not doing so is likely to create a messed up display when sent over the
sideband protocol.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | usage.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -7,9 +7,9 @@ static void report(const char *prefix, const char *err, va_list params) { - fputs(prefix, stderr); - vfprintf(stderr, err, params); - fputs("\n", stderr); + char msg[256]; + vsnprintf(msg, sizeof(msg), err, params); + fprintf(stderr, "%s%s\n", prefix, msg); } static NORETURN void usage_builtin(const char *err) |