# Do not barf on too long action description

1 messages from 2007-04-28 to 2007-04-28. Participants: Junio C Hamano.
Thread: https://gitlist.dev/t/7881

## Junio C Hamano, 2007-04-28 07:15

Subject: Do not barf on too long action description
Message-ID: <7v3b2lklzv.fsf_-_@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v3b2lklzv.fsf_-_%40assigned-by-dhcp.cox.net
In-Reply-To: <20070428002638.GF18276@pasky.or.cz>

```
Reflog message is primarily about easier identification, and
leaving truncated entry is much better than dying.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 builtin-fetch--tool.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c
index 3145c01..1b04881 100644
--- a/builtin-fetch--tool.c
+++ b/builtin-fetch--tool.c
@@ -42,9 +42,7 @@ static int update_ref(const char *action,
 
 	if (!rla)
 		rla = "(reflog update)";
-	len = snprintf(msg, sizeof(msg), "%s: %s", rla, action);
-	if (sizeof(msg) <= len)
-		die("insanely long action");
+	snprintf(msg, sizeof(msg), "%s: %s", rla, action);
 	lock = lock_any_ref_for_update(refname, oldval);
 	if (!lock)
 		return 1;

```
