summaryrefslogtreecommitdiff
path: root/builtin-fetch--tool.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-fetch--tool.c')
-rw-r--r--builtin-fetch--tool.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c
index 3145c01f7e..2065466f27 100644
--- a/builtin-fetch--tool.c
+++ b/builtin-fetch--tool.c
@@ -35,16 +35,13 @@ static int update_ref(const char *action,
unsigned char *sha1,
unsigned char *oldval)
{
- int len;
char msg[1024];
char *rla = getenv("GIT_REFLOG_ACTION");
static struct ref_lock *lock;
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;