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

Re: [PATCH v3] builtin/refs: add '--skip-reflog' flag to bypass reflog migration

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 13, 2025, 18:06 UTC
Message-ID
<xmqq4j0xpvmu.fsf@gitster.g>
In-Reply-To
<CAOLa=ZSDLNLYQ=zsoOqJW6KhcUqeDahNfhG-n9k1t0O6B40OnA@mail.gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
> To just get rid of reflogs from a repository, I think 'git reflog drop'
> or something similar would indeed be a better way to go about it. As you
> stated, with this patch, we could still face the issue wherein the
> administartor could re-enable reflog and we're back to square one.
Exactly.
> Why I think this patch is important, is because while there could be
> existing reflogs in a repository, if one doesn't care about _reflogs_
> there could be significant performance gains while migrating repos from
> one backend to the other, while also leaving the reflogs behind.

Sure. It could be done with a combination of "git reflog drop && git refs migrate" (or "git refs migrate && git reflog drop", if the migrated-to backend performs better when it drops reflogs).

With "git refs migrate --skip-reflog" alone, we are very limited. We can lose reflogs _only_ when we are migrating.

Doing it _during_ migration may very well be more efficient than dropping first and then migrate (or the other way around), so I do not have much against the "migrate --skip-reflog" existing. But I find it backwards to add it first _before_ we have a tool that is more generally applicable to wider situations, i.e., "reflog drop".

IOW, it feels as if we are worried about icing on the cake long before we actually bake the cake.

Previous: Karthik NayakNext: Karthik Nayak
Message 14 of 26 in “builtin/refs: add '--skip-reflog' flag to bypass reflog migration”
  1. builtin/refs: add '--skip-reflog' flag to bypass reflog migrationKarthik Nayak, Feb 7, 2025
  2. Patrick SteinhardtFeb 7, 2025
  3. Karthik NayakFeb 11, 2025
  4. Justin ToblerFeb 7, 2025
  5. Karthik NayakFeb 11, 2025
  6. builtin/refs: add '--skip-reflog' flag to bypass reflog migrationKarthik Nayak, Feb 11, 2025
  7. Patrick SteinhardtFeb 11, 2025
  8. Junio C HamanoFeb 11, 2025
  9. Karthik NayakFeb 12, 2025
  10. Karthik NayakFeb 13, 2025
  11. builtin/refs: add '--skip-reflog' flag to bypass reflog migrationKarthik Nayak, Feb 12, 2025
  12. Junio C HamanoFeb 12, 2025
  13. Karthik NayakFeb 13, 2025
  14. Junio C HamanoFeb 13, 2025
  15. Karthik NayakFeb 14, 2025
  16. Toon ClaesFeb 19, 2025
  17. Junio C HamanoFeb 19, 2025
  18. Karthik NayakFeb 19, 2025
  19. Junio C HamanoFeb 19, 2025
  20. Karthik NayakFeb 20, 2025
  21. builtin/refs: add '--no-reflog' flag to drop reflogsKarthik Nayak, Feb 20, 2025
  22. Junio C HamanoFeb 20, 2025
  23. Karthik NayakFeb 21, 2025
  24. builtin/refs: add '--no-reflog' flag to drop reflogsKarthik Nayak, Feb 21, 2025
  25. Junio C HamanoFeb 21, 2025
  26. Karthik NayakFeb 23, 2025

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.