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

reflog delete results in reflog show strangeness?

From
BHBob Hiestand <bob.hiestand@gmail.com>
Date
Nov 14, 2008, 22:33 UTC
Message-ID
<cc29171c0811141433t43d27c5gb57ca11d2ddb67cb@mail.gmail.com>

I see a possible bug in the output of 'git reflog show' after using 'git reflog delete'. Simple example:

$ git init $ git commit --allow-empty -m 'root' $ git commit --allow-empty -m 'good' $ git commit --allow-empty -m 'bad' $ git reflog 996ca67... HEAD@{0}: commit: bad e431a20... HEAD@{1}: commit: good 992dd88... HEAD@{2}: commit (initial): root

$ git reset HEAD^ $ git reflog e431a20... HEAD@{0}: HEAD^: updating HEAD 996ca67... HEAD@{1}: commit: bad e431a20... HEAD@{2}: commit: good 992dd88... HEAD@{3}: commit (initial): root

$ git reflog delete HEAD@{1} $ git reflog e431a20... HEAD@{0}: HEAD^: updating HEAD 996ca67... HEAD@{1}: commit: good 992dd88... HEAD@{2}: commit (initial): root

In this listing, please note that, after the delete, the commit SHA shown as HEAD@{1} is that of the deleted reference (the bad commit) and does not match the reflog message, which has the expected value.

Thank you,
bob
Next: Bob Hiestand
Message 1 of 2 in “reflog delete results in reflog show strangeness?”
  1. Bob HiestandNov 14, 2008
  2. Bob HiestandNov 14, 2008

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.