Re: [PATCH 7/7] refs: add support for migrating reflogs
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Dec 11, 2024, 14:26 UTC
- Message-ID
- <Z1mhFqmznVxObmAn@pks.im>
- In-Reply-To
- <20241209-320-git-refs-migrate-reflogs-v1-7-d4bc37ee860f@gmail.com>
On Mon, Dec 09, 2024 at 12:07:21PM +0100, Karthik Nayak wrote:
Show 8 quoted lines
> @@ -2687,6 +2688,7 @@ int ref_update_check_old_target(const char *referent, struct ref_update *update,
> }
>
> struct migration_data {
> + unsigned int index;
> struct ref_store *old_refs;
> struct ref_transaction *transaction;
> struct strbuf *errbuf;Calling this `reflog_index` might be a bit easier for context.
Show 8 quoted lines
> @@ -2868,8 +2894,8 @@ int repo_migrate_ref_storage_format(struct repository *repo, > * 1. Set up a new temporary directory and initialize it with the new > * format. This is where all refs will be migrated into. > * > - * 2. Enumerate all refs and write them into the new ref storage. > - * This operation is safe as we do not yet modify the main > + * 2. Enumerate all refs and reflogs and write them into the new ref > + * storage. This operation is safe as we do not yet modify the main
I'd rather move this into a third step, as it is separate from the ref enumeration.
Patrick