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

Re: [PATCH v5] builtin/refs: add '--no-reflog' flag to drop reflogs

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 21, 2025, 17:54 UTC
Message-ID
<xmqq8qpzb2vb.fsf@gitster.g>
In-Reply-To
<20250221100423.91075-1-karthik.188@gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 32 quoted lines
> The "git refs migrate" subcommand converts the backend used for ref
> storage. It always migrates reflog data as well as refs. Introduce an
> option to exclude reflogs from migration, allowing them to be discarded
> when they are unnecessary.
>
> This is particularly useful in server-side repositories, where reflogs
> are typically not expected. However, some repositories may still have
> them due to historical reasons, such as bugs, misconfigurations, or
> administrative decisions to enable reflogs for debugging. In such
> repositories, it would be optimal to drop reflogs during the migration.
>
> To address this, introduce the '--no-reflog' flag, which prevents reflog
> migration. When this flag is used, reflogs from the original reference
> backend are migrated. Since only the new reference backend remains in
> the repository, all previous reflogs are permanently discarded.
>
> Helped-by: Junio C Hamano <gitster@pobox.com>
> Helped-by: Patrick Steinhardt <ps@pks.im>
> Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
> ---
>  Documentation/git-refs.txt | 11 ++++++++---
>  builtin/refs.c             |  3 +++
>  refs.c                     |  8 +++++---
>  refs.h                     |  5 ++++-
>  t/t1460-refs-migrate.sh    | 28 ++++++++++++++++++++++++----
>  5 files changed, 44 insertions(+), 11 deletions(-)
>
> Changes in v5:
> - Add missing documentation and cleanup the commit message.
> - I also see that 'git-refs.txt' in master has been renamed to 'git-refs.adoc',
>   but I'm going to avoid rebasing on latest master, since the resolution is
>   quite simple here. Happy to do it if needed. 
It is a good rule of thumb to refrain from rebasing when in doubt.
Shall we declare victory and mark the topic for 'next' by now?
Thanks.
Previous: Karthik NayakNext: Karthik Nayak
Message 25 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.