Re: "git stash list" shows HEAD reflog
- From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
- Date
- Mar 13, 2010, 22:07 UTC
- Message-ID
- <4B9C0CB1.3000308@lsrfire.ath.cx>
- In-Reply-To
- <4B9C0713.30407@pcharlan.com>
Am 13.03.2010 22:43, schrieb Pete Harlan:
Show 8 quoted lines
> 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é