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

Re: Distinguishing FF vs non-FF updates in the reflog?

From
MFMartin Fick <mfick@codeaurora.org>
Date
Mar 18, 2021, 22:24 UTC
Message-ID
<4400050.5IlZNYTcJN@mfick-lnx>
In-Reply-To
<CAFQ2z_MavgAGDyJzc9-+j6zTDODP7hCdPHtB5dyx-reLMSLX3Q@mail.gmail.com>
On Thursday, March 18, 2021 9:58:56 AM MDT Han-Wen Nienhuys wrote:
Show 18 quoted lines
> On Wed, Mar 17, 2021 at 10:22 PM Martin Fick <mfick@codeaurora.org> wrote:
> > On Wednesday, March 17, 2021 9:06:06 PM MDT Han-Wen Nienhuys wrote:
> > > I'm working on some extensions to Gerrit for which it would be very
> > > beneficial if we could tell from the reflog if an update is a
> > > fast-forward or not: if we find a SHA1 in the reflog, and see there
> > > were only FF updates since, we can be sure that the SHA1 is reachable
> > > from the branch, without having to open packfiles and decode commits.
> > 
> > I don't think this would be reliable.
> > 
> > 1) Not all updates make it to the reflogs
> > 2) Reflogs can be edited or mucked with
> > 3) On NFS reflogs can outright be wrong even when used properly as their
> > are caching issues. We specifically have seen entries that appear to be
> > FFs that were not.
> 
> Can you tell a little more about 3) ? SInce we don't annotate non-FF
> vs FF today, what does "appear to be FFs" mean?

To be honest I don't recall for sure, but I will describe what I think has happened. I think that we have seen a server(A) update a branch from C1 to C2A, and then later another server(B) update the same branch from C1 to C2B. Obviously the move from C2A to C2B is not a FF, but that move is not what is recorded. Each of those updates was a FF when viewed as separate entries, but if you look at both lines you can see that the second entry does not start where the first one left off. This would be detectable, it would appear as if there was a missed entry that did a rewind from C2A to C1, but that rewind presumably actually came in as part of the second update from server (B) as it had a cached version of the branch and believed it still pointed to C1 when it made its update,

-Martin
-- 
The Qualcomm Innovation Center, Inc. is a member of Code 
Aurora Forum, hosted by The Linux Foundation
Previous: Jeff KingNext: Han-Wen Nienhuys
Message 5 of 19 in “Distinguishing FF vs non-FF updates in the reflog?”
  1. Han-Wen NienhuysMar 17, 2021
  2. Martin FickMar 17, 2021
  3. Han-Wen NienhuysMar 18, 2021
  4. Jeff KingMar 18, 2021
  5. Martin FickMar 18, 2021
  6. Han-Wen NienhuysMar 22, 2021
  7. Martin FickMar 22, 2021
  8. Martin FickMar 18, 2021
  9. Jeff KingMar 18, 2021
  10. Jeff KingMar 18, 2021
  11. Han-Wen NienhuysMar 22, 2021
  12. Jeff KingMar 26, 2021
  13. Ævar Arnfjörð BjarmasonMar 22, 2021
  14. Han-Wen NienhuysMar 22, 2021
  15. Ævar Arnfjörð BjarmasonMar 22, 2021
  16. Han-Wen NienhuysMar 22, 2021
  17. Ævar Arnfjörð BjarmasonMar 22, 2021
  18. Han-Wen NienhuysMar 22, 2021
  19. Junio C HamanoMar 22, 2021

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.