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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Karthik Nayak <karthik.188@xxxxxxxxx> 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.

It wasn't really obvious to me this change removes the reflog, instead
of "skipping". So I was surprised the reflog was removed after
migrating, instead of staying in tact using the files backend.

Only after reading through the test and the discussion in this thread I
realized that's the intented behavior.

So can I suggest to name the option `--no-reflog`? To me that makes it
more obvious the reflog won't exist no more after migrating, and is more
in line with the common UX of Git. Also emphasizing this more clearly in
the commit message and help message also would be advised.

-- 
Toon




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux