Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
print warning/error/fatal messages in one shot
author
Nicolas Pitre
<nico@cam.org>
Fri, 9 Nov 2007 19:33:54 +0000
(14:33 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Sat, 10 Nov 2007 06:25:36 +0000
(22:25 -0800)
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>
usage.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
b9217c0
)
diff --git
a/usage.c
b/usage.c
index f5e652cc76d7587fd7b682eb865d3436c99b16fb..a5fc4ec5fae66823266862fa0254474696c220e6 100644
(file)
--- a/
usage.c
+++ b/
usage.c
@@
-7,9
+7,9
@@
static void report(const char *prefix, const char *err, va_list params)
{
-
fputs(prefix, stderr)
;
- v
fprintf(stderr
, err, params);
- fp
uts("\n", stderr
);
+
char msg[256]
;
+ v
snprintf(msg, sizeof(msg)
, err, params);
+ fp
rintf(stderr, "%s%s\n", prefix, msg
);
}
static NORETURN void usage_builtin(const char *err)