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

Distinguishing FF vs non-FF updates in the reflog?

From
Han-Wen Nienhuys <hanwen@google.com>
Date
Mar 17, 2021, 20:06 UTC
Message-ID
<CAFQ2z_MefCwiWdhs0buJv5Zok+nsgaOvUCcsSnfm_PP0WozZKA@mail.gmail.com>
Hi there,

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.

For the reftable format, I think we could store this easily by introducing more record types. Today we have 0 = deletion, 1 = update, and we could add 2 = FF update, 3 = non-FF update.

However, the textual reflog format doesn't easily allow for this. However, we might add a convention, eg. have the message start with 'FF' or 'NFF' depending on the nature of the update.

Does this make sense, and if yes is it worth proposing a change?
thanks,
-- 
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--

Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Next: Martin Fick
Message 1 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.