git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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é
Previous: Pete Harlan
Message 11 of 11 in “"git stash list" shows HEAD reflog”
  1. Vladimir PanteleevMar 12, 2010
  2. René ScharfeMar 13, 2010
  3. Dave OlszewskiMar 13, 2010
  4. René ScharfeMar 13, 2010
  5. Dave OlszewskiMar 13, 2010
  6. René ScharfeMar 13, 2010
  7. don't use default revision if a rev was specifiedDave Olszewski, Mar 13, 2010
  8. René ScharfeMar 13, 2010
  9. Junio C HamanoMar 14, 2010
  10. Pete HarlanMar 13, 2010
  11. René ScharfeMar 13, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.