git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Increase the size of the die/warning buffer to avoid truncation
@ 2009-03-24 23:10 Shawn O. Pearce
  0 siblings, 0 replies; only message in thread
From: Shawn O. Pearce @ 2009-03-24 23:10 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git

Long messages like those from lockfile.c when a lock can't be
obtained truncate with only 256 bytes in the message buffer.
Bump it to 1024 to give more space for these longer cases.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 This works around the truncation I noticed in the error message
 from the second command in the sequence:

   $ git branch foo.lock
   $ git branch foo

 usage.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usage.c b/usage.c
index 24f5fc0..820d09f 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[256];
+	char msg[1024];
 	vsnprintf(msg, sizeof(msg), err, params);
 	fprintf(stderr, "%s%s\n", prefix, msg);
 }
-- 
1.6.2.1.471.g682837

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

only message in thread, other threads:[~2009-03-24 23:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-24 23:10 [PATCH] Increase the size of the die/warning buffer to avoid truncation Shawn O. Pearce

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).