Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed Nov 10, 2007
1 parent b9217c0 commit d048a96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions usage.c
Expand Up @@ -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)
Expand Down

0 comments on commit d048a96

Please sign in to comment.