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

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

From
Karthik Nayak <karthik.188@gmail.com>
Date
Feb 13, 2025, 09:25 UTC
Message-ID
<CAOLa=ZSzLYWLckuEsCfLyXcgrukbNUgE-LZohUeH0=LZA+47bA@mail.gmail.com>
In-Reply-To
<xmqqcyfoz82h.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 56 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes:
>
>> The 'git-refs(1)' migrate subcommand, which transfers repositories
>> between reference backends, currently migrates reflogs by default as of
>> 246cebe320 (refs: add support for migrating reflogs, 2024-12-16).
>>
>> While this behavior is desirable for most client-side repositories,
>> server-side repositories are not expected to contain reflogs. However,
>> due to historical reasons, some may still have them. This could be
>> caused, for example, by bugs, misconfiguration, or an administrator
>> enabling reflogs on the server for debugging purposes.
>>
>> To address this, introduce the --skip-reflog flag, allowing users to
>> bypass reflog migration. This ensures that the repository ends up in the
>> expected state after migration.
>>
>> Helped-by: Patrick Steinhardt <ps@pks.im>
>> Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
>> ---
>> Changes in v2:
>> - Fix typo in commit mesasge and clarify the intent.
>> - Modify the test to use `test_line_count` and `test_must_be_empty`.
>> - Link to v1: https://lore.kernel.org/r/20250207-477-refs-migrate-add-a-flag-to-ignore-reflogs-during-migration-v1-1-7d40f3b4e30b@gmail.com
>> ---
>> Range-diff versus v1:
>>
>> 1:  ce14d3d07e ! 1:  6b83089348 builtin/refs: add '--skip-reflog' flag to bypass reflog migration
>>     @@ Commit message
>>
>>          The 'git-refs(1)' migrate subcommand, which transfers repositories
>>          between reference backends, currently migrates reflogs by default as of
>> ...
>>      +		'
>>       	done
>>       done
>> ---
>>  builtin/refs.c          |  3 +++
>>  refs.c                  |  8 +++++---
>>  refs.h                  |  5 ++++-
>>  t/t1460-refs-migrate.sh | 19 +++++++++++++++++--
>>  4 files changed, 29 insertions(+), 6 deletions(-)
>
> This is tangent that is totally unrelated to the theme of this
> patch, but I find that the placement of range-diff makes it very
> hard to follow.
>
> After skimming the proposed log message, the next thing I would want
> to see is the list of paths that are modified, before deciding I
> want to review the patch now.  Once I decide to read it _now_, the
> changes from the previous iteration and range-diff becomes relevant.
>
> Is it just me who decides in what order to review the patches and
> then reviews them in that order?
>
> Anyway.
>

I missed responding to this in my previous email, but I've been using b4 for sending patches and this was primarily due to how it sends single patch series.

I've fixed the template to show the diff-stat first, and this should be the case for upcoming patches.

Thanks for pointing it out!
[snip]
Previous: Karthik NayakNext: Karthik Nayak
Message 10 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.