aboutsummaryrefslogtreecommitdiff
path: root/builtin-fetch--tool.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-29 01:52:43 -0700
committerJunio C Hamano <junkio@cox.net>2007-04-29 01:52:43 -0700
commit39231b1c32caee10c7ac3397341ea0c6cf56e7f9 (patch)
tree5e51fb9d639bf6b6b99ae5d01286360b7303f2f1 /builtin-fetch--tool.c
parent4342572600f446b9f8db553df03d458229f944dd (diff)
parente9d54bd18bcf5dc9eb68eb1cba9a6a7ba3f71fd6 (diff)
downloadgit-39231b1c32caee10c7ac3397341ea0c6cf56e7f9.tar.gz
git-39231b1c32caee10c7ac3397341ea0c6cf56e7f9.tar.xz
Merge branch 'maint'
* maint: http.c: Fix problem with repeated calls of http_init Add missing reference to GIT_COMMITTER_DATE in git-commit-tree documentation Fix import-tars fix. Update .mailmap with "Michael" Do not barf on too long action description Catch empty pathnames in trees during fsck Don't allow empty pathnames in fast-import import-tars: be nice to wrong directory modes git-svn: Added 'find-rev' command git shortlog documentation: add long options and fix a typo
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 3145c01f7..2065466f2 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;