[PATCH] Increase the size of the die/warning buffer to avoid truncation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux