Subject: Re: Funny reflog has missing space

From: Junio C Hamano <[email-masked]>
Date: Tue, 27 Feb 2007 12:32:39 -0800

Junio C Hamano <[email-masked]> writes:

> Andy Parkins <[email-masked]> writes:
>
>> Hello,
>>
>> I've just peeked in my reflog (tail .git/logs/HEAD), and found something 
>> strange:
>>
>> 72160ca5c05fab4fbd3c24c9b13cbd0651b60532 
>> ca7b20e2677960cfc52c525b8f8bdf12ce79176b Andy Parkins <[email-masked]> 
>> 1172589175 +0000commit: Log message goes here
>>
>> Notice that there is no space between the "+0000" and the "commit".
>> ...
>> Is this normal?  "git-reflog show" works fine in both cases.
>
> It is not.  It would be good to find out who puts corrupted
> entry.

Hmmm.  I am puzzled.  The only two low-level locations I know of
that writes into reflog are:

 * builtin-reflog.c::expire_reflog_ent() copies existing log
   entry, which are parsed out, after reformatting it.  It has
   an explicit "\t" in the format string, so it is not it.

 * refs.c::log_ref_write() gets an optional log message and
   writes it after the GMT offset, with an explicit "\t", so
   this is not it, either.