Skip to content

Commit

Permalink
Fix truncated usage messages
Browse files Browse the repository at this point in the history
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 d048a96) 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>
  • Loading branch information
Björn Gustavsson authored and Junio C Hamano committed Nov 23, 2009
1 parent 39add7a commit 625a860
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 625a860

Please sign in to comment.