Browse Source

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>
maint
Nicolas Pitre 17 years ago committed by Junio C Hamano
parent
commit
d048a96ee9
  1. 6
      usage.c

6
usage.c

@ -7,9 +7,9 @@ @@ -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)

Loading…
Cancel
Save