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

Re: [BUG?] inconsistent `git reflog show` output, possibly `git fsck` output

From
Keshav Kini <keshav.kini@gmail.com>
Date
Oct 28, 2013, 17:16 UTC
Message-ID
<8761shjoyx.fsf@gmail.com>
In-Reply-To
<xmqqtxgib1qm.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> Roberto Tyley <roberto.tyley@gmail.com> writes:
>> On 21/09/2013 23:16, Keshav Kini wrote:
>>> [SNIP]
>>> This situation came about because the BFG Repo-Cleaner doesn't write new
>>> reflog entries after creating its new objects and moving refs around.
>>
>> True enough - I don't think the BFG does write new entires to the
>> reflog when it does the final ref-update, and it would be nicer if it
>> did. I'll get that fixed.
>
> (sorry for replying late)
>
> So this can be closed as "BFG not writing reflog in a consistent
> way, and 'git reflog show' is acting GIGO way"?  Or was there
> something the core side needs to do?
Hi Junio,

Below I'm resending a mail that I sent to the list earlier, but not to you or Roberto personally, as I just realized. So in case you didn't see it before, here it is -- if you did see it before, sorry for the noise.

Hi Junio,

Thanks for your reply. In my original mail, immediately after the snippet Roberto quoted above, I said, "But that aside, I think how git handles the situation might be a bug." To wit:

Show 12 quoted lines
> It seems to me that one of two things should be the case. Either 1) it
> should be considered impossible to have a reflog for a ref X which
> doesn't contain a chain of commits leading up to the current location of
> X; or 2) if reflogs are allowed not to form an unbroken chain of commits
> leading to X, then `git reflog show` should at least make sure to
> actually display a commit ID corresponding to the second field of each
> reflog entry it reads, and not some other commit ID.
> 
> In the first case, the bug is that `git fsck` doesn't catch the
> supposedly impossible situation that exists in the repository I've
> described in this email. In the second case, the bug is that `git reflog
> show` has bad output.

Before this is closed, I would appreciate it if I could get some feedback from git developers on the above two paragraphs.

Thanks,
    Keshav
Previous: Keshav Kini
Message 6 of 6 in “[BUG?] inconsistent `git reflog show` output, possibly `git fsck` output”
  1. Keshav KiniSep 21, 2013
  2. Keshav KiniSep 22, 2013
  3. Roberto TyleySep 22, 2013
  4. Junio C HamanoOct 15, 2013
  5. Keshav KiniOct 15, 2013
  6. Keshav KiniOct 28, 2013

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.