Subject: Re: "git stash list" shows HEAD reflog

From: René Scharfe <[email-masked]>
Date: Sat, 13 Mar 2010 23:07:45 +0100

Am 13.03.2010 22:43, schrieb Pete Harlan:
> On 03/13/2010 09:37 AM, René Scharfe wrote:
>> As Vladimir reported, "git log -g refs/stash" surprisingly showed the reflog
>> of HEAD if the message in the reflog file was too long.  To fix this, convert
>> for_each_recent_reflog_ent() to use strbuf_getwholeline() instead of fgets(),
>> for safety and to avoid any size limits for reflog entries.
> 
> Was the old code actually unsafe?  If not, then perhaps the commit
> message would be clearer if ", for safety and" were removed.

The function silently dropped valid (if long) reflog entries on the
floor.  It's certainly debatable if not doing so is "safer" or merely
"more complete".  The sentence is already long enough in any case, so I
don't mind dropping this part.

René