public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] Fix truncated usage messages
@ 2009-11-22 21:19 Björn Gustavsson
  0 siblings, 0 replies; only message in thread
From: Björn Gustavsson @ 2009-11-22 21:19 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

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>
---
 usage.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usage.c b/usage.c
index e307e01..79856a2 100644
--- 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);
 }
-- 
1.6.5.3.298.g39add

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-22 21:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-22 21:19 [PATCH] Fix truncated usage messages Björn Gustavsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox