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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user