]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Fix truncated usage messages
authorBjörn Gustavsson <bgustavsson@gmail.com>
Sun, 22 Nov 2009 21:19:53 +0000 (22:19 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Nov 2009 00:14:48 +0000 (16:14 -0800)
The usage messages for some commands (such as 'git diff-tree')
are truncated because they don't fit in a fixed buffer of
1024 bytes.

It would be tempting to eliminate the buffer and the problem once
and for all by doing the output in three steps, but doing so could
(according to commit d048a96e) increase the likelyhood of messing
up the display.

So we just increase the size of the buffer.

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
usage.c

diff --git a/usage.c b/usage.c
index e307e01b99ccc55a82040066499ad3651cd2407a..79856a2b9f5bc4603252cb10b471a0815416a617 100644 (file)
--- a/usage.c
+++ b/usage.c
@@ -7,7 +7,7 @@
 
 static void report(const char *prefix, const char *err, va_list params)
 {
-       char msg[1024];
+       char msg[4096];
        vsnprintf(msg, sizeof(msg), err, params);
        fprintf(stderr, "%s%s\n", prefix, msg);
 }