{"thread":{"id":"18514","subject":"[PATCH] Increase the size of the die/warning buffer to avoid truncation","startedAt":"2009-03-24T23:10:35Z","lastAt":"2009-03-24T23:10:35Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"109262","messageId":"20090324231035.GR23521@spearce.org","threadId":"18514","inReplyTo":null,"subject":"[PATCH] Increase the size of the die/warning buffer to avoid truncation","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-24T23:10:35Z","receivedAt":"2009-03-24T23:10:35Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Long messages like those from lockfile.c when a lock can't be\nobtained truncate with only 256 bytes in the message buffer.\nBump it to 1024 to give more space for these longer cases.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n This works around the truncation I noticed in the error message\n from the second command in the sequence:\n\n   $ git branch foo.lock\n   $ git branch foo\n\n usage.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/usage.c b/usage.c\nindex 24f5fc0..820d09f 100644\n--- a/usage.c\n+++ b/usage.c\n@@ -7,7 +7,7 @@\n \n static void report(const char *prefix, const char *err, va_list params)\n {\n-\tchar msg[256];\n+\tchar msg[1024];\n \tvsnprintf(msg, sizeof(msg), err, params);\n \tfprintf(stderr, \"%s%s\\n\", prefix, msg);\n }\n-- \n1.6.2.1.471.g682837\n"}]}